1
0
forked from 0ad/0ad

fix self-tests.

clarify that timestamp in system_info is UTC.

This was SVN commit r5055.
This commit is contained in:
janwas 2007-05-10 21:33:56 +00:00
parent 80057a82e5
commit 45c76ce39d
6 changed files with 11 additions and 11 deletions

View File

@ -275,7 +275,7 @@ const char* ia32_IdentifierString()
// identifier_string already holds a valid brand string; pretty it up. // identifier_string already holds a valid brand string; pretty it up.
else else
{ {
const char* undesired_strings[] = { "(tm)", "(R)", "CPU " }; const char* const undesired_strings[] = { "(tm)", "(TM)", "(R)", "CPU " };
std::for_each(undesired_strings, undesired_strings+ARRAY_SIZE(undesired_strings), std::for_each(undesired_strings, undesired_strings+ARRAY_SIZE(undesired_strings),
StringStripper(identifier_string, ARRAY_SIZE(identifier_string))); StringStripper(identifier_string, ARRAY_SIZE(identifier_string)));

View File

@ -2,7 +2,7 @@
#include "lib/base32.h" #include "lib/base32.h"
class TestLib : public CxxTest::TestSuite class TestBase32 : public CxxTest::TestSuite
{ {
public: public:
void test_base32() void test_base32()

View File

@ -2,7 +2,7 @@
#include "lib/bits.h" #include "lib/bits.h"
class TestLib : public CxxTest::TestSuite class TestBits : public CxxTest::TestSuite
{ {
public: public:
void test_is_pow2() void test_is_pow2()
@ -33,11 +33,11 @@ public:
TS_ASSERT_EQUALS(ceil_log2(0x80000000u), 31u); TS_ASSERT_EQUALS(ceil_log2(0x80000000u), 31u);
} }
void test_ilog2f() void test_floor_log2()
{ {
TS_ASSERT_EQUALS(ilog2(1.f), 0); TS_ASSERT_EQUALS(floor_log2(1.f), 0);
TS_ASSERT_EQUALS(ilog2(3.f), 1); TS_ASSERT_EQUALS(floor_log2(3.f), 1);
TS_ASSERT_EQUALS(ilog2(256.f), 8); TS_ASSERT_EQUALS(floor_log2(256.f), 8);
} }
void test_round_up_to_pow2() void test_round_up_to_pow2()

View File

@ -2,7 +2,7 @@
#include "lib/fnv_hash.h" #include "lib/fnv_hash.h"
class TestLib : public CxxTest::TestSuite class TestFnvHash : public CxxTest::TestSuite
{ {
public: public:
void test_fnv_hash() void test_fnv_hash()

View File

@ -2,7 +2,7 @@
#include "lib/regex.h" #include "lib/regex.h"
class TestLib : public CxxTest::TestSuite class TestRegex : public CxxTest::TestSuite
{ {
public: public:
void test_regex() void test_regex()

View File

@ -65,9 +65,9 @@ void WriteSystemInfo()
time_t seconds; time_t seconds;
time(&seconds); time(&seconds);
struct tm* t = gmtime(&seconds); struct tm* t = gmtime(&seconds);
const size_t chars_written = strftime(timestamp_buf, ARRAY_SIZE(timestamp_buf), "(generated %Y-%m-%d %H:%M:%S)", t); const size_t chars_written = strftime(timestamp_buf, ARRAY_SIZE(timestamp_buf), "(generated %Y-%m-%d %H:%M:%S UTC)", t);
debug_assert(chars_written != 0); debug_assert(chars_written != 0);
fprintf(f, "%s\n", timestamp_buf); fprintf(f, "%s\n\n", timestamp_buf);
} }
// OS // OS