Files
0ad/source/lib/sysdep/os/win/tests/test_ia32.h
T
Vladislav Belov 72e12ddd6a Removes unused sysdep functions and macro
Removed:

* os_cpu_QueryMemorySize
* os_cpu_MemorySize
* GetCapBits
* rdtsc
* CONFIG2_TIMER_ALLOW_RDTSC
2026-10-19 01:09:22 +02:00

42 lines
1.6 KiB
C++

/* Copyright (C) 2026 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "lib/self_test.h"
#include "lib/sysdep/arch/x86_x64/x86_x64.h"
// note: ia32_i??_from_*, ia32_rint*, ia32_fm??f are all tested within
// sysdep to avoid test duplication (both the ia32 versions and
// the portable fallback must behave the same).
class TestIA32: public CxxTest::TestSuite
{
public:
void test_ia32_cap()
{
// make sure the really common/basic caps end up reported as true
TS_ASSERT(x86_x64::Cap(x86_x64::CAP_FPU));
TS_ASSERT(x86_x64::Cap(x86_x64::CAP_TSC));
TS_ASSERT(x86_x64::Cap(x86_x64::CAP_MMX));
}
};