Update assert API in test lib; add to and harness; add test lib to VS2010 and VS2012 solution; fix VS2012 solution; fix compiler warning
authorAndreas Schiffler <aschiffler@ferzkopp.net>
Sat, 01 Dec 2012 14:48:30 -0800
changeset 6718918ba414168b
parent 6717 2acd95060548
child 6719 c250f633c040
Update assert API in test lib; add to and harness; add test lib to VS2010 and VS2012 solution; fix VS2012 solution; fix compiler warning
VisualC/SDL_VS2010.sln
VisualC/SDL_VS2012.sln
VisualC/SDLtest/SDLtest_VS2010.vcxproj
VisualC/SDLtest/SDLtest_VS2012.vcxproj
include/SDL_test_assert.h
src/joystick/darwin/SDL_sysjoystick.c
src/test/SDL_test_assert.c
src/test/SDL_test_harness.c
src/test/SDL_test_log.c
src/test/SDL_test_random.c
     1.1 --- a/VisualC/SDL_VS2010.sln	Fri Nov 30 23:25:34 2012 -0800
     1.2 +++ b/VisualC/SDL_VS2010.sln	Sat Dec 01 14:48:30 2012 -0800
     1.3 @@ -67,6 +67,11 @@
     1.4  		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
     1.5  	EndProjectSection
     1.6  EndProject
     1.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLtest", "SDLtest\SDLtest_VS2010.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
     1.8 +	ProjectSection(ProjectDependencies) = postProject
     1.9 +		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
    1.10 +	EndProjectSection
    1.11 +EndProject
    1.12  Global
    1.13  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    1.14  		Debug|Win32 = Debug|Win32
    1.15 @@ -160,6 +165,14 @@
    1.16  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32
    1.17  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32
    1.18  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32
    1.19 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32
    1.20 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32
    1.21 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64
    1.22 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64
    1.23 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32
    1.24 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32
    1.25 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64
    1.26 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64
    1.27  	EndGlobalSection
    1.28  	GlobalSection(SolutionProperties) = preSolution
    1.29  		HideSolutionNode = FALSE
     2.1 --- a/VisualC/SDL_VS2012.sln	Fri Nov 30 23:25:34 2012 -0800
     2.2 +++ b/VisualC/SDL_VS2012.sln	Sat Dec 01 14:48:30 2012 -0800
     2.3 @@ -7,7 +7,7 @@
     2.4  EndProject
     2.5  Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}"
     2.6  EndProject
     2.7 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "automated", "tests\automated\automated_VS2010.vcxproj", "{DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}"
     2.8 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "automated", "tests\automated\automated_VS2012.vcxproj", "{DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}"
     2.9  	ProjectSection(ProjectDependencies) = postProject
    2.10  		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
    2.11  		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
    2.12 @@ -67,6 +67,11 @@
    2.13  		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
    2.14  	EndProjectSection
    2.15  EndProject
    2.16 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLtest", "SDLtest\SDLtest_VS2012.vcxproj", "{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}"
    2.17 +	ProjectSection(ProjectDependencies) = postProject
    2.18 +		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
    2.19 +	EndProjectSection
    2.20 +EndProject
    2.21  Global
    2.22  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    2.23  		Debug|Win32 = Debug|Win32
    2.24 @@ -160,6 +165,14 @@
    2.25  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.ActiveCfg = Release|Win32
    2.26  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|Win32.Build.0 = Release|Win32
    2.27  		{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}.Release|x64.ActiveCfg = Release|Win32
    2.28 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.ActiveCfg = Debug|Win32
    2.29 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|Win32.Build.0 = Debug|Win32
    2.30 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.ActiveCfg = Debug|x64
    2.31 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Debug|x64.Build.0 = Debug|x64
    2.32 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.ActiveCfg = Release|Win32
    2.33 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|Win32.Build.0 = Release|Win32
    2.34 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.ActiveCfg = Release|x64
    2.35 +		{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}.Release|x64.Build.0 = Release|x64
    2.36  	EndGlobalSection
    2.37  	GlobalSection(SolutionProperties) = preSolution
    2.38  		HideSolutionNode = FALSE
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/VisualC/SDLtest/SDLtest_VS2010.vcxproj	Sat Dec 01 14:48:30 2012 -0800
     3.3 @@ -0,0 +1,177 @@
     3.4 +<?xml version="1.0" encoding="utf-8"?>
     3.5 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     3.6 +  <ItemGroup Label="ProjectConfigurations">
     3.7 +    <ProjectConfiguration Include="Debug|Win32">
     3.8 +      <Configuration>Debug</Configuration>
     3.9 +      <Platform>Win32</Platform>
    3.10 +    </ProjectConfiguration>
    3.11 +    <ProjectConfiguration Include="Debug|x64">
    3.12 +      <Configuration>Debug</Configuration>
    3.13 +      <Platform>x64</Platform>
    3.14 +    </ProjectConfiguration>
    3.15 +    <ProjectConfiguration Include="Release|Win32">
    3.16 +      <Configuration>Release</Configuration>
    3.17 +      <Platform>Win32</Platform>
    3.18 +    </ProjectConfiguration>
    3.19 +    <ProjectConfiguration Include="Release|x64">
    3.20 +      <Configuration>Release</Configuration>
    3.21 +      <Platform>x64</Platform>
    3.22 +    </ProjectConfiguration>
    3.23 +  </ItemGroup>
    3.24 +  <PropertyGroup Label="Globals">
    3.25 +    <ProjectName>SDLtest</ProjectName>
    3.26 +    <ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
    3.27 +  </PropertyGroup>
    3.28 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    3.29 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    3.30 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.31 +    <UseOfMfc>false</UseOfMfc>
    3.32 +  </PropertyGroup>
    3.33 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3.34 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.35 +    <UseOfMfc>false</UseOfMfc>
    3.36 +  </PropertyGroup>
    3.37 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    3.38 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.39 +    <UseOfMfc>false</UseOfMfc>
    3.40 +    <CharacterSet>MultiByte</CharacterSet>
    3.41 +  </PropertyGroup>
    3.42 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    3.43 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.44 +    <UseOfMfc>false</UseOfMfc>
    3.45 +  </PropertyGroup>
    3.46 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    3.47 +  <ImportGroup Label="ExtensionSettings">
    3.48 +  </ImportGroup>
    3.49 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    3.50 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.51 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    3.52 +  </ImportGroup>
    3.53 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    3.54 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.55 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    3.56 +  </ImportGroup>
    3.57 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    3.58 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.59 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    3.60 +  </ImportGroup>
    3.61 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    3.62 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.63 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    3.64 +  </ImportGroup>
    3.65 +  <PropertyGroup Label="UserMacros" />
    3.66 +  <PropertyGroup>
    3.67 +    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
    3.68 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
    3.69 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
    3.70 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
    3.71 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
    3.72 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
    3.73 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
    3.74 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
    3.75 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
    3.76 +  </PropertyGroup>
    3.77 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    3.78 +    <PreBuildEvent />
    3.79 +    <ClCompile>
    3.80 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
    3.81 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    3.82 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    3.83 +      <StringPooling>true</StringPooling>
    3.84 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
    3.85 +      <FunctionLevelLinking>true</FunctionLevelLinking>
    3.86 +      <PrecompiledHeader>
    3.87 +      </PrecompiledHeader>
    3.88 +      <WarningLevel>Level3</WarningLevel>
    3.89 +      <SuppressStartupBanner>true</SuppressStartupBanner>
    3.90 +      <CompileAs>Default</CompileAs>
    3.91 +    </ClCompile>
    3.92 +    <Lib>
    3.93 +      <SuppressStartupBanner>true</SuppressStartupBanner>
    3.94 +    </Lib>
    3.95 +  </ItemDefinitionGroup>
    3.96 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    3.97 +    <Midl>
    3.98 +      <TargetEnvironment>X64</TargetEnvironment>
    3.99 +    </Midl>
   3.100 +    <ClCompile>
   3.101 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
   3.102 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   3.103 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.104 +      <StringPooling>true</StringPooling>
   3.105 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
   3.106 +      <FunctionLevelLinking>true</FunctionLevelLinking>
   3.107 +      <PrecompiledHeader>
   3.108 +      </PrecompiledHeader>
   3.109 +      <WarningLevel>Level3</WarningLevel>
   3.110 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.111 +      <CompileAs>Default</CompileAs>
   3.112 +    </ClCompile>
   3.113 +    <Lib>
   3.114 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.115 +    </Lib>
   3.116 +  </ItemDefinitionGroup>
   3.117 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   3.118 +    <PreBuildEvent />
   3.119 +    <ClCompile>
   3.120 +      <Optimization>Disabled</Optimization>
   3.121 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   3.122 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.123 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
   3.124 +      <PrecompiledHeader>
   3.125 +      </PrecompiledHeader>
   3.126 +      <WarningLevel>Level3</WarningLevel>
   3.127 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.128 +      <DebugInformationFormat>OldStyle</DebugInformationFormat>
   3.129 +      <CompileAs>Default</CompileAs>
   3.130 +    </ClCompile>
   3.131 +    <Lib>
   3.132 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.133 +    </Lib>
   3.134 +  </ItemDefinitionGroup>
   3.135 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   3.136 +    <Midl>
   3.137 +      <TargetEnvironment>X64</TargetEnvironment>
   3.138 +    </Midl>
   3.139 +    <ClCompile>
   3.140 +      <Optimization>Disabled</Optimization>
   3.141 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   3.142 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.143 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
   3.144 +      <PrecompiledHeader>
   3.145 +      </PrecompiledHeader>
   3.146 +      <PrecompiledHeaderOutputFile>.\Debug/SDLtest.pch</PrecompiledHeaderOutputFile>
   3.147 +      <WarningLevel>Level3</WarningLevel>
   3.148 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.149 +      <DebugInformationFormat>OldStyle</DebugInformationFormat>
   3.150 +      <CompileAs>Default</CompileAs>
   3.151 +    </ClCompile>
   3.152 +    <Lib>
   3.153 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   3.154 +    </Lib>
   3.155 +  </ItemDefinitionGroup>
   3.156 +  <ItemGroup>
   3.157 +    <ClInclude Include="..\..\include\SDL_test.h" />
   3.158 +    <ClInclude Include="..\..\include\SDL_test_assert.h" />
   3.159 +    <ClInclude Include="..\..\include\SDL_test_crc32.h" />
   3.160 +    <ClInclude Include="..\..\include\SDL_test_font.h" />
   3.161 +    <ClInclude Include="..\..\include\SDL_test_fuzzer.h" />
   3.162 +    <ClInclude Include="..\..\include\SDL_test_harness.h" />
   3.163 +    <ClInclude Include="..\..\include\SDL_test_log.h" />
   3.164 +    <ClInclude Include="..\..\include\SDL_test_md5.h" />
   3.165 +    <ClInclude Include="..\..\include\SDL_test_random.h" />
   3.166 +  </ItemGroup>
   3.167 +  <ItemGroup>
   3.168 +    <ClCompile Include="..\..\src\test\SDL_test_assert.c" />
   3.169 +    <ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
   3.170 +    <ClCompile Include="..\..\src\test\SDL_test_font.c" />
   3.171 +    <ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
   3.172 +    <ClCompile Include="..\..\src\test\SDL_test_harness.c" />
   3.173 +    <ClCompile Include="..\..\src\test\SDL_test_log.c" />
   3.174 +    <ClCompile Include="..\..\src\test\SDL_test_md5.c" />
   3.175 +    <ClCompile Include="..\..\src\test\SDL_test_random.c" />
   3.176 +  </ItemGroup>
   3.177 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   3.178 +  <ImportGroup Label="ExtensionTargets">
   3.179 +  </ImportGroup>
   3.180 +</Project>
   3.181 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/VisualC/SDLtest/SDLtest_VS2012.vcxproj	Sat Dec 01 14:48:30 2012 -0800
     4.3 @@ -0,0 +1,181 @@
     4.4 +<?xml version="1.0" encoding="utf-8"?>
     4.5 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     4.6 +  <ItemGroup Label="ProjectConfigurations">
     4.7 +    <ProjectConfiguration Include="Debug|Win32">
     4.8 +      <Configuration>Debug</Configuration>
     4.9 +      <Platform>Win32</Platform>
    4.10 +    </ProjectConfiguration>
    4.11 +    <ProjectConfiguration Include="Debug|x64">
    4.12 +      <Configuration>Debug</Configuration>
    4.13 +      <Platform>x64</Platform>
    4.14 +    </ProjectConfiguration>
    4.15 +    <ProjectConfiguration Include="Release|Win32">
    4.16 +      <Configuration>Release</Configuration>
    4.17 +      <Platform>Win32</Platform>
    4.18 +    </ProjectConfiguration>
    4.19 +    <ProjectConfiguration Include="Release|x64">
    4.20 +      <Configuration>Release</Configuration>
    4.21 +      <Platform>x64</Platform>
    4.22 +    </ProjectConfiguration>
    4.23 +  </ItemGroup>
    4.24 +  <PropertyGroup Label="Globals">
    4.25 +    <ProjectName>SDLtest</ProjectName>
    4.26 +    <ProjectGuid>{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}</ProjectGuid>
    4.27 +  </PropertyGroup>
    4.28 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    4.29 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    4.30 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    4.31 +    <UseOfMfc>false</UseOfMfc>
    4.32 +    <PlatformToolset>v110</PlatformToolset>
    4.33 +  </PropertyGroup>
    4.34 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    4.35 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    4.36 +    <UseOfMfc>false</UseOfMfc>
    4.37 +    <PlatformToolset>v110</PlatformToolset>
    4.38 +  </PropertyGroup>
    4.39 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    4.40 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    4.41 +    <UseOfMfc>false</UseOfMfc>
    4.42 +    <CharacterSet>MultiByte</CharacterSet>
    4.43 +    <PlatformToolset>v110</PlatformToolset>
    4.44 +  </PropertyGroup>
    4.45 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    4.46 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    4.47 +    <UseOfMfc>false</UseOfMfc>
    4.48 +    <PlatformToolset>v110</PlatformToolset>
    4.49 +  </PropertyGroup>
    4.50 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    4.51 +  <ImportGroup Label="ExtensionSettings">
    4.52 +  </ImportGroup>
    4.53 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    4.54 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.55 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    4.56 +  </ImportGroup>
    4.57 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    4.58 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.59 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    4.60 +  </ImportGroup>
    4.61 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    4.62 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.63 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    4.64 +  </ImportGroup>
    4.65 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    4.66 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    4.67 +    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
    4.68 +  </ImportGroup>
    4.69 +  <PropertyGroup Label="UserMacros" />
    4.70 +  <PropertyGroup>
    4.71 +    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
    4.72 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
    4.73 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
    4.74 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
    4.75 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
    4.76 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</OutDir>
    4.77 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
    4.78 +    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
    4.79 +    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
    4.80 +  </PropertyGroup>
    4.81 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    4.82 +    <PreBuildEvent />
    4.83 +    <ClCompile>
    4.84 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
    4.85 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    4.86 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    4.87 +      <StringPooling>true</StringPooling>
    4.88 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
    4.89 +      <FunctionLevelLinking>true</FunctionLevelLinking>
    4.90 +      <PrecompiledHeader>
    4.91 +      </PrecompiledHeader>
    4.92 +      <WarningLevel>Level3</WarningLevel>
    4.93 +      <SuppressStartupBanner>true</SuppressStartupBanner>
    4.94 +      <CompileAs>Default</CompileAs>
    4.95 +    </ClCompile>
    4.96 +    <Lib>
    4.97 +      <SuppressStartupBanner>true</SuppressStartupBanner>
    4.98 +    </Lib>
    4.99 +  </ItemDefinitionGroup>
   4.100 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
   4.101 +    <Midl>
   4.102 +      <TargetEnvironment>X64</TargetEnvironment>
   4.103 +    </Midl>
   4.104 +    <ClCompile>
   4.105 +      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
   4.106 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   4.107 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   4.108 +      <StringPooling>true</StringPooling>
   4.109 +      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
   4.110 +      <FunctionLevelLinking>true</FunctionLevelLinking>
   4.111 +      <PrecompiledHeader>
   4.112 +      </PrecompiledHeader>
   4.113 +      <WarningLevel>Level3</WarningLevel>
   4.114 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.115 +      <CompileAs>Default</CompileAs>
   4.116 +    </ClCompile>
   4.117 +    <Lib>
   4.118 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.119 +    </Lib>
   4.120 +  </ItemDefinitionGroup>
   4.121 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   4.122 +    <PreBuildEvent />
   4.123 +    <ClCompile>
   4.124 +      <Optimization>Disabled</Optimization>
   4.125 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   4.126 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   4.127 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
   4.128 +      <PrecompiledHeader>
   4.129 +      </PrecompiledHeader>
   4.130 +      <WarningLevel>Level3</WarningLevel>
   4.131 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.132 +      <DebugInformationFormat>OldStyle</DebugInformationFormat>
   4.133 +      <CompileAs>Default</CompileAs>
   4.134 +    </ClCompile>
   4.135 +    <Lib>
   4.136 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.137 +    </Lib>
   4.138 +  </ItemDefinitionGroup>
   4.139 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   4.140 +    <Midl>
   4.141 +      <TargetEnvironment>X64</TargetEnvironment>
   4.142 +    </Midl>
   4.143 +    <ClCompile>
   4.144 +      <Optimization>Disabled</Optimization>
   4.145 +      <AdditionalIncludeDirectories>..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   4.146 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   4.147 +      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
   4.148 +      <PrecompiledHeader>
   4.149 +      </PrecompiledHeader>
   4.150 +      <PrecompiledHeaderOutputFile>.\Debug/SDLtest.pch</PrecompiledHeaderOutputFile>
   4.151 +      <WarningLevel>Level3</WarningLevel>
   4.152 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.153 +      <DebugInformationFormat>OldStyle</DebugInformationFormat>
   4.154 +      <CompileAs>Default</CompileAs>
   4.155 +    </ClCompile>
   4.156 +    <Lib>
   4.157 +      <SuppressStartupBanner>true</SuppressStartupBanner>
   4.158 +    </Lib>
   4.159 +  </ItemDefinitionGroup>
   4.160 +  <ItemGroup>
   4.161 +    <ClInclude Include="..\..\include\SDL_test.h" />
   4.162 +    <ClInclude Include="..\..\include\SDL_test_assert.h" />
   4.163 +    <ClInclude Include="..\..\include\SDL_test_crc32.h" />
   4.164 +    <ClInclude Include="..\..\include\SDL_test_font.h" />
   4.165 +    <ClInclude Include="..\..\include\SDL_test_fuzzer.h" />
   4.166 +    <ClInclude Include="..\..\include\SDL_test_harness.h" />
   4.167 +    <ClInclude Include="..\..\include\SDL_test_log.h" />
   4.168 +    <ClInclude Include="..\..\include\SDL_test_md5.h" />
   4.169 +    <ClInclude Include="..\..\include\SDL_test_random.h" />
   4.170 +  </ItemGroup>
   4.171 +  <ItemGroup>
   4.172 +    <ClCompile Include="..\..\src\test\SDL_test_assert.c" />
   4.173 +    <ClCompile Include="..\..\src\test\SDL_test_crc32.c" />
   4.174 +    <ClCompile Include="..\..\src\test\SDL_test_font.c" />
   4.175 +    <ClCompile Include="..\..\src\test\SDL_test_fuzzer.c" />
   4.176 +    <ClCompile Include="..\..\src\test\SDL_test_harness.c" />
   4.177 +    <ClCompile Include="..\..\src\test\SDL_test_log.c" />
   4.178 +    <ClCompile Include="..\..\src\test\SDL_test_md5.c" />
   4.179 +    <ClCompile Include="..\..\src\test\SDL_test_random.c" />
   4.180 +  </ItemGroup>
   4.181 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   4.182 +  <ImportGroup Label="ExtensionTargets">
   4.183 +  </ImportGroup>
   4.184 +</Project>
   4.185 \ No newline at end of file
     5.1 --- a/include/SDL_test_assert.h	Fri Nov 30 23:25:34 2012 -0800
     5.2 +++ b/include/SDL_test_assert.h	Sat Dec 01 14:48:30 2012 -0800
     5.3 @@ -45,6 +45,16 @@
     5.4  #endif
     5.5  
     5.6  /**
     5.7 + * \brief Fails the assert.
     5.8 + */
     5.9 +#define ASSERT_FAIL		0
    5.10 +
    5.11 +/**
    5.12 + * \brief Passes the assert.
    5.13 + */
    5.14 +#define ASSERT_PASS		1
    5.15 +
    5.16 +/**
    5.17   * \brief Assert that logs and break execution flow on failures.
    5.18   *
    5.19   * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    5.20 @@ -57,8 +67,10 @@
    5.21   *
    5.22   * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
    5.23   * \param assertDescription Message to log with the assert describing it.
    5.24 + *
    5.25 + * \returns Returns the assertCondition so it can be used to externall to break execution flow if desired.
    5.26   */
    5.27 -void SDLTest_AssertCheck(int assertCondition, char *assertDescription);
    5.28 +int SDLTest_AssertCheck(int assertCondition, char *assertDescription);
    5.29  
    5.30  /**
    5.31   * \brief Resets the assert summary counters to zero.
     6.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Fri Nov 30 23:25:34 2012 -0800
     6.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Sat Dec 01 14:48:30 2012 -0800
     6.3 @@ -920,7 +920,6 @@
     6.4  SDL_SYS_JoystickAttached(SDL_Joystick * joystick)
     6.5  {
     6.6  	recDevice *device = gpDeviceList;
     6.7 -    int index;
     6.8  	
     6.9  	while ( device )
    6.10  	{
     7.1 --- a/src/test/SDL_test_assert.c	Fri Nov 30 23:25:34 2012 -0800
     7.2 +++ b/src/test/SDL_test_assert.c	Sat Dec 01 14:48:30 2012 -0800
     7.3 @@ -30,10 +30,10 @@
     7.4  #include "SDL_test.h"
     7.5  
     7.6  /*! \brief counts the failed asserts */
     7.7 -static Uint32 SDLTest_testAssertsFailed = 0;
     7.8 +static Uint32 SDLTest_AssertsFailed = 0;
     7.9  
    7.10  /*! \brief counts the passed asserts */
    7.11 -static Uint32 SDLTest_testAssertsPassed = 0;
    7.12 +static Uint32 SDLTest_AssertsPassed = 0;
    7.13  
    7.14  /* Assert check message format */
    7.15  const char *SDLTest_AssertCheckFmt = "Assert %s: %s";
    7.16 @@ -46,26 +46,27 @@
    7.17   */
    7.18  void SDLTest_Assert(int assertCondition, char *assertDescription)
    7.19  {
    7.20 -	SDLTest_AssertCheck(assertCondition, assertDescription);
    7.21 -	SDL_assert((assertCondition));
    7.22 +	SDL_assert((SDLTest_AssertCheck(assertCondition, assertDescription)));
    7.23  }
    7.24  
    7.25  /*
    7.26   * Assert that logs but does not break execution flow on failures (i.e. for test cases).
    7.27   */
    7.28 -void SDLTest_AssertCheck(int assertCondition, char *assertDescription)
    7.29 +int SDLTest_AssertCheck(int assertCondition, char *assertDescription)
    7.30  {
    7.31  	char *fmt = (char *)SDLTest_AssertCheckFmt;
    7.32 -	if (assertCondition)
    7.33 +	if (assertCondition == ASSERT_FAIL)
    7.34  	{
    7.35 -		SDLTest_testAssertsPassed++;
    7.36 -		SDLTest_Log(fmt, "Passed", assertDescription);
    7.37 +		SDLTest_AssertsFailed++;
    7.38 +		SDLTest_LogError(fmt, "Failed", assertDescription);
    7.39  	} 
    7.40  	else 
    7.41  	{
    7.42 -		SDLTest_testAssertsFailed++;
    7.43 -		SDLTest_LogError(fmt, "Failed", assertDescription);
    7.44 +		SDLTest_AssertsPassed++;
    7.45 +		SDLTest_Log(fmt, "Passed", assertDescription);
    7.46  	}
    7.47 +
    7.48 +	return assertCondition;
    7.49  }
    7.50  
    7.51  /*
    7.52 @@ -73,8 +74,8 @@
    7.53   */
    7.54  void SDLTest_ResetAssertSummary()
    7.55  {
    7.56 -	SDLTest_testAssertsPassed = 0;
    7.57 -	SDLTest_testAssertsFailed = 0;
    7.58 +	SDLTest_AssertsPassed = 0;
    7.59 +	SDLTest_AssertsFailed = 0;
    7.60  }
    7.61  
    7.62  /*
    7.63 @@ -84,13 +85,13 @@
    7.64  void SDLTest_LogAssertSummary()
    7.65  {
    7.66  	char *fmt = (char *)SDLTest_AssertSummaryFmt;
    7.67 -	Uint32 totalAsserts = SDLTest_testAssertsPassed + SDLTest_testAssertsFailed;
    7.68 -	if (SDLTest_testAssertsFailed == 0)
    7.69 +	Uint32 totalAsserts = SDLTest_AssertsPassed + SDLTest_AssertsFailed;
    7.70 +	if (SDLTest_AssertsFailed == 0)
    7.71  	{
    7.72 -		SDLTest_Log(fmt, totalAsserts, SDLTest_testAssertsPassed, SDLTest_testAssertsFailed);
    7.73 +		SDLTest_Log(fmt, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed);
    7.74  	} 
    7.75  	else 
    7.76  	{
    7.77 -		SDLTest_LogError(fmt, totalAsserts, SDLTest_testAssertsPassed, SDLTest_testAssertsFailed);
    7.78 +		SDLTest_LogError(fmt, totalAsserts, SDLTest_AssertsPassed, SDLTest_AssertsFailed);
    7.79  	}
    7.80  }
     8.1 --- a/src/test/SDL_test_harness.c	Fri Nov 30 23:25:34 2012 -0800
     8.2 +++ b/src/test/SDL_test_harness.c	Sat Dec 01 14:48:30 2012 -0800
     8.3 @@ -23,7 +23,10 @@
     8.4  
     8.5  #include "SDL_test.h"
     8.6  
     8.7 -// TODO: port over harness
     8.8 +#include <stdio.h>
     8.9 +#include <string.h>
    8.10 +
    8.11 +// TODO: port over remaining harness
    8.12  
    8.13  /**
    8.14   * Generates a random run seed string for the harness. The generated seed
    8.15 @@ -140,3 +143,48 @@
    8.16  
    8.17  	return keys[0];
    8.18  }
    8.19 +
    8.20 +/**
    8.21 + * \brief Set timeout handler for test.
    8.22 + *
    8.23 + * Note: SDL_Init(SDL_INIT_TIMER) will be called if it wasn't done so before.
    8.24 + *
    8.25 + * \param timeout Timeout interval in seconds.
    8.26 + * \param callback Function that will be called after timeout has elapsed.
    8.27 + * 
    8.28 + * \return Timer id or -1 on failure.
    8.29 + */
    8.30 +SDL_TimerID
    8.31 +SetTestTimeout(int timeout, void (*callback)())
    8.32 +{
    8.33 +	Uint32 timeoutInMilliseconds;
    8.34 +	SDL_TimerID timerID;
    8.35 +
    8.36 +	if (callback == NULL) {
    8.37 +		SDLTest_LogError("Timeout callback can't be NULL");
    8.38 +		return -1;
    8.39 +	}
    8.40 +
    8.41 +	if (timeout < 0) {
    8.42 +		SDLTest_LogError("Timeout value must be bigger than zero.");
    8.43 +		return -1;
    8.44 +	}
    8.45 +
    8.46 +	/* Init SDL timer if not initialized before */
    8.47 +	if (SDL_WasInit(SDL_INIT_TIMER) == 0) {
    8.48 +		if (SDL_InitSubSystem(SDL_INIT_TIMER)) {
    8.49 +			SDLTest_LogError("Failed to init timer subsystem: %s", SDL_GetError());
    8.50 +			return -1;
    8.51 +		}
    8.52 +	}
    8.53 +
    8.54 +	/* Set timer */
    8.55 +	timeoutInMilliseconds = timeout * 1000;
    8.56 +	timerID = SDL_AddTimer(timeoutInMilliseconds, (SDL_TimerCallback)callback, 0x0);
    8.57 +	if (timerID == 0) {
    8.58 +		SDLTest_LogError("Creation of SDL timer failed: %s", SDL_GetError());
    8.59 +		return -1;
    8.60 +	}
    8.61 +
    8.62 +	return timerID;
    8.63 +}
     9.1 --- a/src/test/SDL_test_log.c	Fri Nov 30 23:25:34 2012 -0800
     9.2 +++ b/src/test/SDL_test_log.c	Sat Dec 01 14:48:30 2012 -0800
     9.3 @@ -25,6 +25,9 @@
     9.4  
     9.5  */
     9.6  
     9.7 +// quiet windows compiler warnings
     9.8 +#define _CRT_SECURE_NO_WARNINGS
     9.9 +
    9.10  #include "SDL_config.h"
    9.11  
    9.12  #include <stdarg.h> /* va_list */
    10.1 --- a/src/test/SDL_test_random.c	Fri Nov 30 23:25:34 2012 -0800
    10.2 +++ b/src/test/SDL_test_random.c	Sat Dec 01 14:48:30 2012 -0800
    10.3 @@ -30,6 +30,8 @@
    10.4  
    10.5  #include "SDL_config.h"
    10.6  
    10.7 +#include <stdlib.h>
    10.8 +#include <stdio.h>
    10.9  #include <time.h>
   10.10  
   10.11  #include "SDL_test.h"