diff --git a/include/mtl/tests/fixed.hpp b/include/mtl/tests/fixed.hpp index 63b5774..f330cff 100644 --- a/include/mtl/tests/fixed.hpp +++ b/include/mtl/tests/fixed.hpp @@ -24,7 +24,10 @@ public: } static bool construction() { - return fixed(7).raw() == 7 * 64; + start_timer(); + bool r = fixed(7).raw() == 7 * 64; + end_timer(); + return r; } // All tests are placed in IWRAM in ARM mode. diff --git a/src/tests/fixed.cpp b/src/tests/fixed.cpp index 6f14fef..853a8b8 100644 --- a/src/tests/fixed.cpp +++ b/src/tests/fixed.cpp @@ -11,7 +11,10 @@ namespace test{ bool fixed_suite::addition() { struct { NOINLINE fixed operator()(fixed x, fixed y) { - return x + y; + start_timer(); + fixed r = x + y; + end_timer(); + return r; } } f; @@ -21,7 +24,10 @@ bool fixed_suite::addition() { bool fixed_suite::subtraction() { struct { NOINLINE fixed operator()(fixed x, fixed y) { - return x - y; + start_timer(); + fixed r = x - y; + end_timer(); + return r; } } f; @@ -31,7 +37,10 @@ bool fixed_suite::subtraction() { bool fixed_suite::multiplication() { struct { NOINLINE fixed operator()(fixed x, fixed y) { - return x * y; + start_timer(); + fixed r = x * y; + end_timer(); + return r; } } f; @@ -44,7 +53,10 @@ bool fixed_suite::mult_overflow() { // is used internally) struct { NOINLINE fixed operator()(fixed x, fixed y) { - return x * y; + start_timer(); + fixed r = x * y; + end_timer(); + return r; } } f; @@ -54,7 +66,10 @@ bool fixed_suite::mult_overflow() { bool fixed_suite::division() { struct { NOINLINE fixed operator()(fixed x, fixed y) { - return x / y; + start_timer(); + fixed r = x / y; + end_timer(); + return r; } } f;