[Scummvm-git-logs] scummvm master -> 0f3424be059d2cc9a502c94af655cd93b0c8be3b

sev- noreply at scummvm.org
Mon May 15 12:32:46 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:
0f3424be05 TESTS: Rename clashing global variables


Commit: 0f3424be059d2cc9a502c94af655cd93b0c8be3b
    https://github.com/scummvm/scummvm/commit/0f3424be059d2cc9a502c94af655cd93b0c8be3b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-05-15T14:32:29+02:00

Commit Message:
TESTS: Rename clashing global variables

Changed paths:
    test/common/crc.h


diff --git a/test/common/crc.h b/test/common/crc.h
index 2d991ed546d..601cb039130 100644
--- a/test/common/crc.h
+++ b/test/common/crc.h
@@ -4,8 +4,8 @@
 #include "common/crc_slow.h"
 
 namespace {
-const byte *testString = (const byte *)"The quick brown fox jumps over the lazy dog";
-const int testLen = 43;
+const byte *testStringCRC = (const byte *)"The quick brown fox jumps over the lazy dog";
+const int testLenCRC = 43;
 }
 
 class CrcTestSuite : public CxxTest::TestSuite
@@ -13,9 +13,9 @@ class CrcTestSuite : public CxxTest::TestSuite
 public:
 	void test_crc32() {
 		Common::CRC32 crc;
-		TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0x414fa339U);
+		TS_ASSERT_EQUALS(crc.crcFast(testStringCRC, testLenCRC), 0x414fa339U);
 		uint32 running = crc.getInitRemainder();
-		for (const byte *ptr = testString; *ptr; ptr++) {
+		for (const byte *ptr = testStringCRC; *ptr; ptr++) {
 			running = crc.processByte(*ptr, running);
 		}
 		TS_ASSERT_EQUALS(crc.finalize(running), 0x414fa339U);
@@ -23,9 +23,9 @@ public:
 
 	void test_crc16() {
 		Common::CRC16 crc;
-		TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0xfcdfU);
+		TS_ASSERT_EQUALS(crc.crcFast(testStringCRC, testLenCRC), 0xfcdfU);
 		uint16 running = crc.getInitRemainder();
-		for (const byte *ptr = testString; *ptr; ptr++) {
+		for (const byte *ptr = testStringCRC; *ptr; ptr++) {
 			running = crc.processByte(*ptr, running);
 		}
 		TS_ASSERT_EQUALS(crc.finalize(running), 0xfcdfU);
@@ -33,9 +33,9 @@ public:
 
 	void test_crc_ccitt() {
 		Common::CRC_CCITT crc; // aka ccitt-false
-		TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0x8fddU);
+		TS_ASSERT_EQUALS(crc.crcFast(testStringCRC, testLenCRC), 0x8fddU);
 		uint16 running = crc.getInitRemainder();
-		for (const byte *ptr = testString; *ptr; ptr++) {
+		for (const byte *ptr = testStringCRC; *ptr; ptr++) {
 			running = crc.processByte(*ptr, running);
 		}
 		TS_ASSERT_EQUALS(crc.finalize(running), 0x8fddU);
@@ -43,9 +43,9 @@ public:
 
 	void test_crc_binhex() {
 		Common::CRC_BINHEX crc; // Aka xmodem
-		TS_ASSERT_EQUALS(crc.crcFast(testString, testLen), 0xf0c8U);
+		TS_ASSERT_EQUALS(crc.crcFast(testStringCRC, testLenCRC), 0xf0c8U);
 		uint16 running = crc.getInitRemainder();
-		for (const byte *ptr = testString; *ptr; ptr++) {
+		for (const byte *ptr = testStringCRC; *ptr; ptr++) {
 			running = crc.processByte(*ptr, running);
 		}
 		TS_ASSERT_EQUALS(crc.finalize(running), 0xf0c8U);
@@ -53,21 +53,21 @@ public:
 
 	void test_crc32_slow() {
 		Common::CRC32_Slow crc;
-		TS_ASSERT_EQUALS(crc.crcSlow(testString, testLen), 0x414fa339U);
+		TS_ASSERT_EQUALS(crc.crcSlow(testStringCRC, testLenCRC), 0x414fa339U);
 	}
 
 	void test_crc16_slow() {
 		Common::CRC16_Slow crc;
-		TS_ASSERT_EQUALS(crc.crcSlow(testString, testLen), 0xfcdfU);
+		TS_ASSERT_EQUALS(crc.crcSlow(testStringCRC, testLenCRC), 0xfcdfU);
 	}
 
 	void test_crc_ccitt_slow() {
 		Common::CRC_CCITT_Slow crc; // aka ccitt-false
-		TS_ASSERT_EQUALS(crc.crcSlow(testString, testLen), 0x8fddU);
+		TS_ASSERT_EQUALS(crc.crcSlow(testStringCRC, testLenCRC), 0x8fddU);
 	}
 
 	void test_crc_binhex_slow() {
 		Common::CRC_BINHEX_Slow crc; // Aka xmodem
-		TS_ASSERT_EQUALS(crc.crcSlow(testString, testLen), 0xf0c8U);
+		TS_ASSERT_EQUALS(crc.crcSlow(testStringCRC, testLenCRC), 0xf0c8U);
 	}
 };




More information about the Scummvm-git-logs mailing list