]> git.lizzy.rs Git - minetest.git/blobdiff - src/unittest/test.h
Fix arm inertia limit case
[minetest.git] / src / unittest / test.h
index f6c4711a5ce08b40fd49903ce28c985465cd420f..bf76e8bb248e849d86677642408bbee0488d2e34 100644 (file)
@@ -33,7 +33,7 @@ class TestFailedException : public std::exception {
 
 // Runs a unit test and reports results
 #define TEST(fxn, ...) do {                                                   \
-       u32 t1 = porting::getTime(PRECISION_MILLI);                               \
+       u64 t1 = porting::getTimeMs();                                            \
        try {                                                                     \
                fxn(__VA_ARGS__);                                                     \
                rawstream << "[PASS] ";                                               \
@@ -46,7 +46,7 @@ class TestFailedException : public std::exception {
                num_tests_failed++;                                                   \
        }                                                                         \
        num_tests_run++;                                                          \
-       u32 tdiff = porting::getTime(PRECISION_MILLI) - t1;                       \
+       u64 tdiff = porting::getTimeMs() - t1;                                    \
        rawstream << #fxn << " - " << tdiff << "ms" << std::endl;                 \
 } while (0)
 
@@ -142,6 +142,6 @@ extern content_t t_CONTENT_WATER;
 extern content_t t_CONTENT_LAVA;
 extern content_t t_CONTENT_BRICK;
 
-void run_tests();
+bool run_tests();
 
 #endif