@@ -103,16 +103,16 @@ class TestType : public TestFixture {
103103 // unsigned types getting promoted to int sizeof(int) = 4 bytes
104104 // and unsigned types having already a size of 4 bytes
105105 {
106- const std::string types[] = {" unsigned char" , /* [unsigned] */ " char " , " bool" , " unsigned short" , " unsigned int" , " unsigned long" };
106+ const std::string types[] = {" unsigned char" , " bool" , " unsigned short" , " unsigned int" , " unsigned long" };
107107 for (const std::string& type : types) {
108108 check (type + " f(" + type +" x) { return x << 31; }" , dinit (CheckOptions, $.settings = &settings));
109- ASSERT_EQUALS (" " , errout_str ());
109+ ASSERT_EQUALS_MSG (" " , errout_str (), type );
110110 check (type + " f(" + type +" x) { return x << 33; }" , dinit (CheckOptions, $.settings = &settings));
111- ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n " , errout_str ());
111+ ASSERT_EQUALS_MSG (" [test.cpp:1]: (error) Shifting 32-bit value by 33 bits is undefined behaviour\n " , errout_str (), type );
112112 check (type + " f(int x) { return (x = (" + type + " )x << 32); }" , dinit (CheckOptions, $.settings = &settings));
113- ASSERT_EQUALS (" [test.cpp:1]: (error) Shifting 32-bit value by 32 bits is undefined behaviour\n " , errout_str ());
113+ ASSERT_EQUALS_MSG (" [test.cpp:1]: (error) Shifting 32-bit value by 32 bits is undefined behaviour\n " , errout_str (), type );
114114 check (type + " foo(" + type + " x) { return x << 31; }" , dinit (CheckOptions, $.settings = &settings));
115- ASSERT_EQUALS (" " , errout_str ());
115+ ASSERT_EQUALS_MSG (" " , errout_str (), type );
116116 }
117117 }
118118 // signed types getting promoted to int sizeof(int) = 4 bytes
0 commit comments