[Scummvm-git-logs] scummvm master -> eeb2d2cf1f5e9ab07377eb823e9738f5b7dcc85a
mduggan
mgithub at guarana.org
Wed Jun 17 09:29:57 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
eeb2d2cf1f ULTIMA8: Fix unit tests
Commit: eeb2d2cf1f5e9ab07377eb823e9738f5b7dcc85a
https://github.com/scummvm/scummvm/commit/eeb2d2cf1f5e9ab07377eb823e9738f5b7dcc85a
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-06-17T18:29:47+09:00
Commit Message:
ULTIMA8: Fix unit tests
Changed paths:
test/engines/ultima/ultima8/usecode/bit_set.h
diff --git a/test/engines/ultima/ultima8/usecode/bit_set.h b/test/engines/ultima/ultima8/usecode/bit_set.h
index 511aba11f3..340c1dba2e 100644
--- a/test/engines/ultima/ultima8/usecode/bit_set.h
+++ b/test/engines/ultima/ultima8/usecode/bit_set.h
@@ -15,21 +15,21 @@ class U8BitSetTestSuite : public CxxTest::TestSuite {
void test_set_get() {
// Test with bit pattern in second byte of 01110100
// (pos goes from low bit to high bit)
- bs.setBits(10, 5, 0x1D);
- TS_ASSERT_EQUALS(bs.getBits(10, 5), 0x1D);
- TS_ASSERT_EQUALS(bs.getBits(10, 4), 0xD);
- TS_ASSERT_EQUALS(bs.getBits(8, 6), 0xD << 2);
- TS_ASSERT_EQUALS(bs.getBits(8, 7), 0x1D << 2);
- TS_ASSERT_EQUALS(bs.getBits(8, 8), 0x1D << 2);
- TS_ASSERT_EQUALS(bs.getBits(14, 2), 0x1);
- TS_ASSERT_EQUALS(bs.getBits(16, 32), 0);
- TS_ASSERT_EQUALS(bs.getBits(0, 10), 0);
+ bs.setEntries(10, 5, 0x1D);
+ TS_ASSERT_EQUALS(bs.getEntries(10, 5), 0x1D);
+ TS_ASSERT_EQUALS(bs.getEntries(10, 4), 0xD);
+ TS_ASSERT_EQUALS(bs.getEntries(8, 6), 0xD << 2);
+ TS_ASSERT_EQUALS(bs.getEntries(8, 7), 0x1D << 2);
+ TS_ASSERT_EQUALS(bs.getEntries(8, 8), 0x1D << 2);
+ TS_ASSERT_EQUALS(bs.getEntries(14, 2), 0x1);
+ TS_ASSERT_EQUALS(bs.getEntries(16, 32), 0);
+ TS_ASSERT_EQUALS(bs.getEntries(0, 10), 0);
}
void test_clear() {
- bs.setBits(10, 5, 0x15);
+ bs.setEntries(10, 5, 0x15);
bs.setSize(0x1000);
- TS_ASSERT_EQUALS(bs.getBits(10, 5), 0);
- TS_ASSERT_EQUALS(bs.getBits(0, 32), 0);
+ TS_ASSERT_EQUALS(bs.getEntries(10, 5), 0);
+ TS_ASSERT_EQUALS(bs.getEntries(0, 32), 0);
}
};
More information about the Scummvm-git-logs
mailing list