[Scummvm-git-logs] scummvm master -> de16ed814b125bab600e041dd9705c4d2de523b1
digitall
noreply at scummvm.org
Mon Feb 20 01:50:39 UTC 2023
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:
de16ed814b TEST: Fix Misleading Indentation GCC Compiler Warnings in Common::Crc tests
Commit: de16ed814b125bab600e041dd9705c4d2de523b1
https://github.com/scummvm/scummvm/commit/de16ed814b125bab600e041dd9705c4d2de523b1
Author: D G Turner (digitall at scummvm.org)
Date: 2023-02-20T01:49:57Z
Commit Message:
TEST: Fix Misleading Indentation GCC Compiler Warnings in Common::Crc tests
Changed paths:
test/common/crc.h
diff --git a/test/common/crc.h b/test/common/crc.h
index 92bdf76cf4c..2d991ed546d 100644
--- a/test/common/crc.h
+++ b/test/common/crc.h
@@ -15,36 +15,40 @@ public:
Common::CRC32 crc;
TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0x414fa339U);
uint32 running = crc.getInitRemainder();
- for (const byte *ptr = testString; *ptr; ptr++)
+ for (const byte *ptr = testString; *ptr; ptr++) {
running = crc.processByte(*ptr, running);
- TS_ASSERT_EQUALS(crc.finalize(running), 0x414fa339U);
+ }
+ TS_ASSERT_EQUALS(crc.finalize(running), 0x414fa339U);
}
void test_crc16() {
Common::CRC16 crc;
TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0xfcdfU);
uint16 running = crc.getInitRemainder();
- for (const byte *ptr = testString; *ptr; ptr++)
+ for (const byte *ptr = testString; *ptr; ptr++) {
running = crc.processByte(*ptr, running);
- TS_ASSERT_EQUALS(crc.finalize(running), 0xfcdfU);
+ }
+ TS_ASSERT_EQUALS(crc.finalize(running), 0xfcdfU);
}
void test_crc_ccitt() {
Common::CRC_CCITT crc; // aka ccitt-false
TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0x8fddU);
uint16 running = crc.getInitRemainder();
- for (const byte *ptr = testString; *ptr; ptr++)
+ for (const byte *ptr = testString; *ptr; ptr++) {
running = crc.processByte(*ptr, running);
- TS_ASSERT_EQUALS(crc.finalize(running), 0x8fddU);
+ }
+ TS_ASSERT_EQUALS(crc.finalize(running), 0x8fddU);
}
void test_crc_binhex() {
Common::CRC_BINHEX crc; // Aka xmodem
TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0xf0c8U);
uint16 running = crc.getInitRemainder();
- for (const byte *ptr = testString; *ptr; ptr++)
+ for (const byte *ptr = testString; *ptr; ptr++) {
running = crc.processByte(*ptr, running);
- TS_ASSERT_EQUALS(crc.finalize(running), 0xf0c8U);
+ }
+ TS_ASSERT_EQUALS(crc.finalize(running), 0xf0c8U);
}
void test_crc32_slow() {
More information about the Scummvm-git-logs
mailing list