2222static int numberOfFailedAssertions = 0 ;
2323
2424#define ASSERT_EQUALS (expected, actual ) (assertEquals((expected), (actual), __LINE__))
25- #define ASSERT_THROW_EQUALS (stmt, e, expected ) do { try { stmt; assertThrowFailed (__LINE__); } catch (const e& ex) { assertEquals ((expected), (ex.what ()), __LINE__); } } while (false )
25+ #define ASSERT_THROW_EQUALS (stmt, e, expected ) do { try { stmt; assertThrowFailed (__LINE__); } catch (const e& ex) { assertEquals ((expected), (ex.what ()), __LINE__); } } while (false )
2626
2727static std::string pprint (const std::string &in)
2828{
@@ -250,10 +250,10 @@ static void characterLiteral()
250250 ASSERT_EQUALS (' \u0012 ' , simplecpp::characterLiteralToLL (" '\\ u0012'" ));
251251 ASSERT_EQUALS (' \U00000012 ' , simplecpp::characterLiteralToLL (" '\\ U00000012'" ));
252252
253- ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' b' )) << 8 ) | static_cast <unsigned char >(' c' ), simplecpp::characterLiteralToLL (" 'bc'" ));
253+ ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' b' )) << 8 ) | static_cast <unsigned char >(' c' ), simplecpp::characterLiteralToLL (" 'bc'" ));
254254 ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' \x23 ' )) << 8 ) | static_cast <unsigned char >(' \x45 ' ), simplecpp::characterLiteralToLL (" '\\ x23\\ x45'" ));
255- ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' \11 ' )) << 8 ) | static_cast <unsigned char >(' \222 ' ), simplecpp::characterLiteralToLL (" '\\ 11\\ 222'" ));
256- ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' \a ' )) << 8 ) | static_cast <unsigned char >(' \b ' ), simplecpp::characterLiteralToLL (" '\\ a\\ b'" ));
255+ ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' \11 ' )) << 8 ) | static_cast <unsigned char >(' \222 ' ), simplecpp::characterLiteralToLL (" '\\ 11\\ 222'" ));
256+ ASSERT_EQUALS ((static_cast <unsigned int >(static_cast <unsigned char >(' \a ' )) << 8 ) | static_cast <unsigned char >(' \b ' ), simplecpp::characterLiteralToLL (" '\\ a\\ b'" ));
257257 if (sizeof (int ) <= 4 )
258258 ASSERT_EQUALS (-1 , simplecpp::characterLiteralToLL (" '\\ xff\\ xff\\ xff\\ xff'" ));
259259 else
@@ -438,14 +438,14 @@ static void comment_multiline()
438438 ASSERT_EQUALS (" \n\n void f ( ) {" , preprocess (code));
439439
440440 const char code1[] = " #define ABC {// \\\r\n "
441- " }\n "
442- " void f() ABC\n " ;
441+ " }\n "
442+ " void f() ABC\n " ;
443443 ASSERT_EQUALS (" \n\n void f ( ) {" , preprocess (code1));
444444
445445 const char code2[] = " #define A 1// \\\r "
446- " \r "
447- " 2\r "
448- " A\r " ;
446+ " \r "
447+ " 2\r "
448+ " A\r " ;
449449 ASSERT_EQUALS (" \n\n 2\n 1" , preprocess (code2));
450450
451451 const char code3[] = " void f() {// \\ \n }\n " ;
@@ -1960,7 +1960,7 @@ static void location1()
19601960 const char *code;
19611961
19621962 code = " # 1 \" main.c\"\n\n\n "
1963- " x" ;
1963+ " x" ;
19641964 ASSERT_EQUALS (" \n #line 3 \" main.c\"\n x" , preprocess (code));
19651965}
19661966
@@ -2290,7 +2290,7 @@ static void include2()
22902290static void include3 () // #16 - crash when expanding macro from header
22912291{
22922292 const char code_c[] = " #include \" A.h\"\n "
2293- " glue(1,2,3,4)\n " ;
2293+ " glue(1,2,3,4)\n " ;
22942294 const char code_h[] = " #define glue(a,b,c,d) a##b##c##d\n " ;
22952295
22962296 std::vector<std::string> files;
@@ -2317,7 +2317,7 @@ static void include3() // #16 - crash when expanding macro from header
23172317
23182318static void include4 () // #27 - -include
23192319{
2320- const char code_c[] = " X\n " ;
2320+ const char code_c[] = " X\n " ;
23212321 const char code_h[] = " #define X 123\n " ;
23222322
23232323 std::vector<std::string> files;
0 commit comments