From 69af5ac8c04f58211c3e1bd73d9c41a5aa3d0759 Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 3 May 2007 15:42:43 +0000 Subject: [PATCH] fix self tests after recent renaming This was SVN commit r5024. --- source/lib/sysdep/tests/test_sysdep.h | 24 ++++++++++----------- source/lib/sysdep/win/tests/test_ia32.h | 2 +- source/lib/sysdep/win/tests/test_wdbg_sym.h | 2 +- source/lib/tests/test_lockfree.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source/lib/sysdep/tests/test_sysdep.h b/source/lib/sysdep/tests/test_sysdep.h index 036c319cfc..5f5e85f89a 100644 --- a/source/lib/sysdep/tests/test_sysdep.h +++ b/source/lib/sysdep/tests/test_sysdep.h @@ -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() diff --git a/source/lib/sysdep/win/tests/test_ia32.h b/source/lib/sysdep/win/tests/test_ia32.h index c5c26be4c9..676394a664 100644 --- a/source/lib/sysdep/win/tests/test_ia32.h +++ b/source/lib/sysdep/win/tests/test_ia32.h @@ -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)); diff --git a/source/lib/sysdep/win/tests/test_wdbg_sym.h b/source/lib/sysdep/win/tests/test_wdbg_sym.h index f68b563fe6..25fe18d16b 100644 --- a/source/lib/sysdep/win/tests/test_wdbg_sym.h +++ b/source/lib/sysdep/win/tests/test_wdbg_sym.h @@ -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); diff --git a/source/lib/tests/test_lockfree.h b/source/lib/tests/test_lockfree.h index 5545efd184..4d4cd8646e 100644 --- a/source/lib/tests/test_lockfree.h +++ b/source/lib/tests/test_lockfree.h @@ -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;