1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include "test_cpu_runtime_detection_x86_checks.hxx"
12 #include <cppunit/TestFixture.h>
13 #include <cppunit/extensions/HelperMacros.h>
15 #include <tools/cpuid.hxx>
19 class CpuRuntimeDetection_SSE2
: public CppUnit::TestFixture
22 void testCpuRuntimeDetection();
24 CPPUNIT_TEST_SUITE(CpuRuntimeDetection_SSE2
);
25 CPPUNIT_TEST(testCpuRuntimeDetection
);
26 CPPUNIT_TEST_SUITE_END();
29 void CpuRuntimeDetection_SSE2::testCpuRuntimeDetection()
31 // can only run this function if CPU supports SSE2
32 if (cpuid::isCpuInstructionSetSupported(cpuid::InstructionSetFlags::SSE2
))
33 CpuRuntimeDetectionX86Checks::checkSSE2();
36 CPPUNIT_TEST_SUITE_REGISTRATION(CpuRuntimeDetection_SSE2
);
38 } // end anonymous namespace
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */