Sfoglia il codice sorgente

test updates for test_ds unit testing

Sean Barrett 6 anni fa
parent
commit
72990efc3e
2 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 1 0
      tests/test_cpp_compilation.cpp
  2. 2 0
      tests/test_ds.c

+ 1 - 0
tests/test_cpp_compilation.cpp

@@ -16,6 +16,7 @@
 #define STB_VOXEL_RENDER_IMPLEMENTATION
 #define STB_CONNECTED_COMPONENTS_IMPLEMENTATION
 #define STB_DS_IMPLEMENTATION
+#define STBDS_UNIT_TESTS
 
 #define STBI_MALLOC     my_malloc
 #define STBI_FREE       my_free

+ 2 - 0
tests/test_ds.c

@@ -43,6 +43,7 @@ void churn(int a, int b, int count)
 }
 
 #ifdef DS_TEST
+#include <stdio.h>
 int main(int argc, char **argv)
 {
   stbds_unit_tests();
@@ -54,6 +55,7 @@ int main(int argc, char **argv)
   churn(200,500, 5000);
   churn(2000,5000, 500);
   churn(20000,50000, 50);
+  printf("Ok!");
   return 0;
 }
 #endif