Browse Source

Added case testing wrapper.

release/0.19
JustinAJ 10 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;
unsigned int goodTests = 0;
unsigned int totalTests = 0;
void test(bool expr)
{
totalTests++;
if (expr) goodTests++;
}
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
system("pause");
#endif // _WIN32

2
Tester/Tester.vcxproj

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

Loading…
Cancel
Save