Browse Source

Added case testing wrapper.

release/0.19
JustinAJ 11 years ago
parent
commit
4d55d05a9a
  1. 11
      Tester/Test.cpp
  2. 2
      Tester/Tester.vcxproj

11
Tester/Test.cpp

@ -8,8 +8,19 @@
using namespace Jupiter; using namespace Jupiter;
unsigned int goodTests = 0;
unsigned int totalTests = 0;
void test(bool expr)
{
totalTests++;
if (expr) goodTests++;
}
int main() int main()
{ {
if (goodTests == totalTests) printf("All %u tests succeeded." ENDL, totalTests);
else printf("ERROR: Only %u/%u tests succeeded. %u tests failed." ENDL, goodTests, totalTests, totalTests - goodTests);
#if defined _WIN32 #if defined _WIN32
system("pause"); system("pause");
#endif // _WIN32 #endif // _WIN32

2
Tester/Tester.vcxproj

@ -63,7 +63,7 @@
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
<Optimization>Disabled</Optimization> <Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

Loading…
Cancel
Save