Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-07-10 08:54:53 +0300
committerkcgen <kcgen@users.noreply.github.com>2022-07-10 09:53:49 +0300
commit2c8c9f6267dff23156a48a9f5c0009ef2cc9482f (patch)
tree03d2b5c16256503d1fb4441b2703aa51c54aa169 /tests
parentca96c0bd2c2a532b7651bd59d44e871777261372 (diff)
Operate on unsigned bits in bitops
Diffstat (limited to 'tests')
-rw-r--r--tests/bitops_tests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bitops_tests.cpp b/tests/bitops_tests.cpp
index 5f8492c95..2aa422860 100644
--- a/tests/bitops_tests.cpp
+++ b/tests/bitops_tests.cpp
@@ -46,7 +46,7 @@ TEST(bitops, enum_vals)
EXPECT_FALSE(b22 == 1 << 23);
EXPECT_FALSE(b31 == 1 << 30);
- EXPECT_TRUE(b31 == 1 << 31);
+ EXPECT_TRUE(b31 == 0b1u << 31);
// check against bit literals
EXPECT_TRUE(b0 == 0b1);
@@ -176,8 +176,8 @@ TEST(bitops, nominal_word)
TEST(bitops, nominal_dword)
{
- const auto even_bits = (b16 | b18 | b20 | b22 | b24 | b26 | b28 | b30);
- const auto odd_bits = (b17 | b19 | b21 | b23 | b25 | b27 | b29 | b31);
+ constexpr uint32_t even_bits = {b16 | b18 | b20 | b22 | b24 | b26 | b28 | b30};
+ constexpr uint32_t odd_bits = {b17 | b19 | b21 | b23 | b25 | b27 | b29 | b31};
uint32_t reg = 0;