X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftest.qc;h=ac792a387ab4e2acfce3408d0e5c819c7b781ff3;hb=2ff5923b5d3acdd9ed21ee37481c69586a6a7bf4;hp=15193fd41db338fddd48ba607fd8281bd6ce2ad4;hpb=265b681e0fb49239df1bfc431a903f66244a3172;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/test.qc b/qcsrc/common/test.qc index 15193fd41..ac792a387 100644 --- a/qcsrc/common/test.qc +++ b/qcsrc/common/test.qc @@ -3,7 +3,7 @@ float TEST_ok; void TEST_Fail(string cond) { - print(sprintf("Assertion failed: ", cond)); + printf("Assertion failed: ", cond); //backtrace(); ++TEST_failed; } @@ -27,29 +27,29 @@ float TEST_RunAll() } if(f) { - print(sprintf("%d tests failed\n", f)); + printf("%d tests failed\n", f); return 1; } else { - print(sprintf("All tests OK\n", f)); + printf("All tests OK\n", f); return 0; } } float TEST_Run(string s) { - print(sprintf("%s: testing...\n", s)); + printf("%s: testing...\n", s); TEST_failed = TEST_ok = 0; callfunction(strcat("_TEST_", s)); if(TEST_failed > 0) { - print(sprintf("%s: %d items failed.\n", s, TEST_failed)); + printf("%s: %d items failed.\n", s, TEST_failed); return 0; } else if(!TEST_ok) { - print(sprintf("%s: did not complete.\n", s)); + printf("%s: did not complete.\n", s); return 0; } return 1;