1
1
forked from 0ad/0ad

fix self tests after recent renaming

This was SVN commit r5024.
This commit is contained in:
janwas 2007-05-03 15:42:43 +00:00
parent 22a01fb3ba
commit 69af5ac8c0
4 changed files with 16 additions and 16 deletions

View File

@ -8,20 +8,20 @@ class TestSysdep : public CxxTest::TestSuite
public:
void test_float_int()
{
TS_ASSERT_EQUALS(cpu_i32_from_float(0.99999f), 0);
TS_ASSERT_EQUALS(cpu_i32_from_float(1.0f), 1);
TS_ASSERT_EQUALS(cpu_i32_from_float(1.01f), 1);
TS_ASSERT_EQUALS(cpu_i32_from_float(5.6f), 5);
TS_ASSERT_EQUALS(cpu_i32FromFloat(0.99999f), 0);
TS_ASSERT_EQUALS(cpu_i32FromFloat(1.0f), 1);
TS_ASSERT_EQUALS(cpu_i32FromFloat(1.01f), 1);
TS_ASSERT_EQUALS(cpu_i32FromFloat(5.6f), 5);
TS_ASSERT_EQUALS(cpu_i32_from_double(0.99999), 0);
TS_ASSERT_EQUALS(cpu_i32_from_double(1.0), 1);
TS_ASSERT_EQUALS(cpu_i32_from_double(1.01), 1);
TS_ASSERT_EQUALS(cpu_i32_from_double(5.6), 5);
TS_ASSERT_EQUALS(cpu_i32FromDouble(0.99999), 0);
TS_ASSERT_EQUALS(cpu_i32FromDouble(1.0), 1);
TS_ASSERT_EQUALS(cpu_i32FromDouble(1.01), 1);
TS_ASSERT_EQUALS(cpu_i32FromDouble(5.6), 5);
TS_ASSERT_EQUALS(cpu_i64_from_double(0.99999), 0LL);
TS_ASSERT_EQUALS(cpu_i64_from_double(1.0), 1LL);
TS_ASSERT_EQUALS(cpu_i64_from_double(1.01), 1LL);
TS_ASSERT_EQUALS(cpu_i64_from_double(5.6), 5LL);
TS_ASSERT_EQUALS(cpu_i64FromDouble(0.99999), 0LL);
TS_ASSERT_EQUALS(cpu_i64FromDouble(1.0), 1LL);
TS_ASSERT_EQUALS(cpu_i64FromDouble(1.01), 1LL);
TS_ASSERT_EQUALS(cpu_i64FromDouble(5.6), 5LL);
}
void test_round()

View File

@ -21,7 +21,7 @@ public:
void test_ia32_cap()
{
ia32_init();
ia32_Init();
// make sure the really common/basic caps end up reported as true
TS_ASSERT(ia32_cap(IA32_CAP_FPU));

View File

@ -59,7 +59,7 @@ class TestWdbgSym : public CxxTest::TestSuite
// therefore, use debug_display_error with DE_HIDE_DIALOG.
// unfortunately this means we can no longer get at the error text.
// a sanity check of the text length has been added to debug_display_error
ErrorMessageMem emm = {0,0,0};
ErrorMessageMem emm = {0};
const wchar_t* text = debug_error_message_build(L"dummy", 0,0,0, 0,0, &emm);
TS_ASSERT(wcslen(text) > 500);
debug_error_message_free(&emm);

View File

@ -88,7 +88,7 @@ class TestMultithread : public CxxTest::TestSuite
TestMultithread* this_ = param->this_;
const uintptr_t thread_number = param->thread_number;
cpu_atomic_add(&this_->num_active_threads, 1);
cpu_AtomicAdd(&this_->num_active_threads, 1);
// chosen randomly every iteration (int_value % 4)
enum TestAction
@ -176,7 +176,7 @@ class TestMultithread : public CxxTest::TestSuite
} // switch
} // while !is_complete
cpu_atomic_add(&this_->num_active_threads, -1);
cpu_AtomicAdd(&this_->num_active_threads, -1);
TS_ASSERT(this_->num_active_threads >= 0);
delete param;