]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/test.qc
Registry: overflow check
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / test.qc
index 04f9f68fe967356327968ae4d1d99168cee88c5d..23907fe5f15ed4106c69fae466807abd79fe2911 100644 (file)
@@ -5,7 +5,7 @@ float TEST_ok;
 
 void TEST_Fail(string cond)
 {
-       printf("Assertion failed: ", cond);
+       LOG_INFOF("Assertion failed: ", cond);
        //backtrace();
        ++TEST_failed;
 }
@@ -28,29 +28,29 @@ float TEST_RunAll()
        }
        if(f)
        {
-               printf("%d tests failed\n", f);
+               LOG_INFOF("%d tests failed\n", f);
                return 1;
        }
        else
        {
-               printf("All tests OK\n", f);
+               LOG_INFOF("All tests OK\n", f);
                return 0;
        }
 }
 
 float TEST_Run(string s)
 {
-       printf("%s: testing...\n", s);
+       LOG_INFOF("%s: testing...\n", s);
        TEST_failed = TEST_ok = 0;
        callfunction(strcat("_TEST_", s));
        if(TEST_failed > 0)
        {
-               printf("%s: %d items failed.\n", s, TEST_failed);
+               LOG_INFOF("%s: %d items failed.\n", s, TEST_failed);
                return 0;
        }
        else if(!TEST_ok)
        {
-               printf("%s: did not complete.\n", s);
+               LOG_INFOF("%s: did not complete.\n", s);
                return 0;
        }
        return 1;