Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add missing VS project dependencies to fix buildbot build; fix surfac…
…e suite; minor update to rwops suite
  • Loading branch information
ferzkopp committed Dec 30, 2012
1 parent 470c9a0 commit 31caa97
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 46 deletions.
5 changes: 5 additions & 0 deletions VisualC/SDL_VS2010.sln
Expand Up @@ -67,6 +67,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLtest", "SDLtest\SDLtest_
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2010.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}"
ProjectSection(ProjectDependencies) = postProject
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
5 changes: 5 additions & 0 deletions VisualC/SDL_VS2012.sln
Expand Up @@ -67,6 +67,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLtest", "SDLtest\SDLtest_
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testautomation", "tests\testautomation\testautomation_vs2012.vcxproj", "{FEE710DB-EC7B-4CCB-BD75-535D401A2FE0}"
ProjectSection(ProjectDependencies) = postProject
{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} = {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}
{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
{DA956FD3-E143-46F2-9FE5-C77BEBC56B1A} = {DA956FD3-E143-46F2-9FE5-C77BEBC56B1A}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
18 changes: 18 additions & 0 deletions VisualC/tests/testautomation/testautomation_vs2010.vcxproj
Expand Up @@ -92,6 +92,12 @@
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand Down Expand Up @@ -136,6 +142,12 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand All @@ -149,6 +161,12 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand Down
18 changes: 18 additions & 0 deletions VisualC/tests/testautomation/testautomation_vs2012.vcxproj
Expand Up @@ -96,6 +96,12 @@
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand Down Expand Up @@ -140,6 +146,12 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand All @@ -160,6 +172,12 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDir)\SDL.dll"</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>Copy SDL</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testautomation.c" />
Expand Down
22 changes: 11 additions & 11 deletions test/testautomation_rwops.c
Expand Up @@ -76,7 +76,7 @@ void
_testGenericRWopsValidations(SDL_RWops *rw, int write)
{
char buf[sizeof(RWopsHelloWorldTestString)];
int i;
Sint64 i;
int seekPos = SDLTest_RandomIntegerInRange(4, 8);

/* Clear buffer */
Expand All @@ -85,33 +85,33 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
/* Set to start. */
i = SDL_RWseek(rw, 0, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
SDLTest_AssertCheck(i == 0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);
SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);

/* Test write. */
i = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1);
SDLTest_AssertPass("Call to SDL_RWwrite succeeded");
if (write) {
SDLTest_AssertCheck(i == 1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", i);
SDLTest_AssertCheck(i == (Sint64)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", i);
}
else {
SDLTest_AssertCheck(i <= 0, "Verify result of writing with SDL_RWwrite, expected <=0, got %i", i);
SDLTest_AssertCheck(i != (Sint64)1, "Verify result of writing with SDL_RWwrite, expected !=1, got %i", i);
}

/* Test seek to random position */
i = SDL_RWseek( rw, seekPos, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
SDLTest_AssertCheck(i == seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %i", seekPos, seekPos, i);
SDLTest_AssertCheck(i == (Sint64)seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %i", seekPos, seekPos, i);

/* Test seek back to start */
i = SDL_RWseek(rw, 0, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
SDLTest_AssertCheck(i == 0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);
SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);

/* Test read */
i = SDL_RWread( rw, buf, 1, sizeof(RWopsHelloWorldTestString)-1 );
SDLTest_AssertPass("Call to SDL_RWread succeeded");
SDLTest_AssertCheck(
i == (sizeof(RWopsHelloWorldTestString)-1),
i == (Sint64)(sizeof(RWopsHelloWorldTestString)-1),
"Verify result from SDL_RWread, expected %i, got %i",
sizeof(RWopsHelloWorldTestString)-1,
i);
Expand All @@ -123,15 +123,15 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
i = SDL_RWseek( rw, -4, RW_SEEK_CUR );
SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded");
SDLTest_AssertCheck(
i == (sizeof(RWopsHelloWorldTestString)-5),
i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5),
"Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i",
sizeof(RWopsHelloWorldTestString)-5,
i);

i = SDL_RWseek( rw, -1, RW_SEEK_END );
SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded");
SDLTest_AssertCheck(
i == (sizeof(RWopsHelloWorldTestString)-2),
i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2),
"Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i",
sizeof(RWopsHelloWorldTestString)-2,
i);
Expand Down Expand Up @@ -326,7 +326,7 @@ rwops_testFPRead(void)
if (fp == NULL) return TEST_ABORTED;

/* Open */
rw = SDL_RWFromFP( fp, 1 );
rw = SDL_RWFromFP( fp, SDL_TRUE );
SDLTest_AssertPass("Call to SDL_RWFromFP() succeeded");
SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFP in read mode does not return NULL");

Expand Down Expand Up @@ -369,7 +369,7 @@ rwops_testFPWrite(void)
if (fp == NULL) return TEST_ABORTED;

/* Open */
rw = SDL_RWFromFP( fp, 1 );
rw = SDL_RWFromFP( fp, SDL_TRUE );
SDLTest_AssertPass("Call to SDL_RWFromFP() succeeded");
SDLTest_AssertCheck(rw != NULL, "Verify opening file with SDL_RWFromFP in write mode does not return NULL");

Expand Down

0 comments on commit 31caa97

Please sign in to comment.