/** * \file * * * \brief byteorder.h macros test. * * \author Francesco Sacchi */ #include #include #include #include "byteorder.h" int byteorder_testSetup(void) { kdbg_init(); return 0; } int byteorder_testTearDown(void) { return 0; } int byteorder_testRun(void) { float a; float b; float c; for (a = 0; a < 12345; a += 0.01) { b = swab_float(a); c = swab_float(b); // kprintf("a=%08lX, b=%08lX, c=%08lX\n", *((uint32_t *)&a), *((uint32_t *)&b), *((uint32_t *)&c)); ASSERT(a == c); } return 0; } TEST_MAIN(byteorder);