summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorGravatar Rodrigo Locatti2021-01-15 04:48:58 -0300
committerGravatar GitHub2021-01-15 04:48:58 -0300
commit5b9aedfc215e2f7227a8604d2d28fb462949d537 (patch)
treeed1f105b1fef3fc9a5209c5106accaaee283ebf2 /src/tests
parentMerge pull request #5354 from ReinUsesLisp/remove-common-color (diff)
parentcommon/bit_util: Replace CLZ/CTZ operations with standardized ones (diff)
downloadyuzu-5b9aedfc215e2f7227a8604d2d28fb462949d537.tar.gz
yuzu-5b9aedfc215e2f7227a8604d2d28fb462949d537.tar.xz
yuzu-5b9aedfc215e2f7227a8604d2d28fb462949d537.zip
Merge pull request #5356 from lioncash/clz
common/bit_util: Replace CLZ/CTZ operations with standardized ones
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/CMakeLists.txt1
-rw-r--r--src/tests/common/bit_utils.cpp23
2 files changed, 0 insertions, 24 deletions
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 8a606b448..33fa89583 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -1,6 +1,5 @@
1add_executable(tests 1add_executable(tests
2 common/bit_field.cpp 2 common/bit_field.cpp
3 common/bit_utils.cpp
4 common/fibers.cpp 3 common/fibers.cpp
5 common/param_package.cpp 4 common/param_package.cpp
6 common/ring_buffer.cpp 5 common/ring_buffer.cpp
diff --git a/src/tests/common/bit_utils.cpp b/src/tests/common/bit_utils.cpp
deleted file mode 100644
index 479b5995a..000000000
--- a/src/tests/common/bit_utils.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
1// Copyright 2017 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <catch2/catch.hpp>
6#include <math.h>
7#include "common/bit_util.h"
8
9namespace Common {
10
11TEST_CASE("BitUtils::CountTrailingZeroes", "[common]") {
12 REQUIRE(Common::CountTrailingZeroes32(0) == 32);
13 REQUIRE(Common::CountTrailingZeroes64(0) == 64);
14 REQUIRE(Common::CountTrailingZeroes32(9) == 0);
15 REQUIRE(Common::CountTrailingZeroes32(8) == 3);
16 REQUIRE(Common::CountTrailingZeroes32(0x801000) == 12);
17 REQUIRE(Common::CountTrailingZeroes64(9) == 0);
18 REQUIRE(Common::CountTrailingZeroes64(8) == 3);
19 REQUIRE(Common::CountTrailingZeroes64(0x801000) == 12);
20 REQUIRE(Common::CountTrailingZeroes64(0x801000000000UL) == 36);
21}
22
23} // namespace Common