diff --git a/unittest/test-harness.h b/unittest/test-harness.h index 0b6b5e0fba..717cfc317f 100644 --- a/unittest/test-harness.h +++ b/unittest/test-harness.h @@ -8,8 +8,8 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#ifndef ARCH_H -#define ARCH_H +#ifndef TEST_HARNESS_H +#define TEST_HARNESS_H class Test { private: @@ -19,22 +19,24 @@ private: friend int main(int argc, char** argv); - void print(uintptr_t value) { + + void print(uint64_t value) { fprintf(stderr, "%p", reinterpret_cast(value)); } + void print(uint32_t value) { + fprintf(stderr, "%p", reinterpret_cast(value)); + } + + + void print(uint8_t value) { + print(static_cast(value)); + } + void print(bool value) { fprintf(stderr, "%s", value ? "true" : "false"); } - void print(uint8_t value) { - fprintf(stderr, "0x%02x", value); - } - - void print(uint64_t value) { - fprintf(stderr, "0x%" LLD, value); - } - int failures; int runs; @@ -82,4 +84,4 @@ public: static bool runAll(); }; -#endif \ No newline at end of file +#endif // TEST_HARNESS_H