diff --git a/CMakeLists.txt b/CMakeLists.txt index eaf3920e6a..99ce879c74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ # vim:noexpandtab: cmake_minimum_required(VERSION 3.6) project(PPSSPP) +enable_testing() #This is supposed to work but doesn't! if(NOT ANDROID) @@ -2118,6 +2119,7 @@ endif() if(UNITTEST) add_executable(unitTest unittest/UnitTest.cpp + unittest/TestShaderGenerators.cpp unittest/TestArmEmitter.cpp unittest/TestArm64Emitter.cpp unittest/TestX64Emitter.cpp @@ -2128,6 +2130,21 @@ if(UNITTEST) ) target_link_libraries(unitTest ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${LinkCommon} Common) setup_target_project(unitTest unittest) + add_test(arm64_emitter unitTest Arm64Emitter) + add_test(arm_emitter unitTest ArmEmitter) + add_test(x64_emitter unitTest X64Emitter) + add_test(vertex_jit unitTest VertexJit) + add_test(asin unitTest Asin) + add_test(sincos unitTest SinCos) + add_test(vfpu_sincos unitTest VFPUSinCos) + add_test(math_util unitTest MathUtil) + add_test(parsers unitTest Parsers) + add_test(jit unitTest Jit) + add_test(matrix_transpose unitTest MatrixTranspose) + add_test(parse_lbn unitTest ParseLBN) + add_test(quick_texhash unitTest QuickTexHash) + add_test(clz unitTest CLZ) + add_test(shadergen unitTest ShaderGenerators) endif() if(LIBRETRO) diff --git a/unittest/UnitTest.cpp b/unittest/UnitTest.cpp index c56ea4a189..677e831717 100644 --- a/unittest/UnitTest.cpp +++ b/unittest/UnitTest.cpp @@ -298,6 +298,7 @@ bool TestParsers() { bool TestVFPUSinCos() { float sine, cosine; + InitVFPUSinCos(false); EXPECT_FALSE(vfpu_sincos == nullptr); vfpu_sincos(0.0f, sine, cosine); EXPECT_EQ_FLOAT(sine, 0.0f);