Files
0ad/source/lib/tests/test_base32.h
T
janwas a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip

This was SVN commit r5050.
2007-05-09 21:01:11 +00:00

18 lines
467 B
C++

#include "lib/self_test.h"
#include "lib/base32.h"
class TestLib : public CxxTest::TestSuite
{
public:
void test_base32()
{
// compare against previous output (generated via this base32() call)
const u8 in[] = { 0x12, 0x57, 0x85, 0xA2, 0xF9, 0x41, 0xCD, 0x57, 0xF3 };
u8 out[20] = {0};
base32(ARRAY_SIZE(in), in, out);
const u8 correct_out[] = "CJLYLIXZIHGVP4C";
TS_ASSERT_SAME_DATA(out, correct_out, ARRAY_SIZE(correct_out));
}
};