| 1000 | } |
| 1001 | |
| 1002 | void removePragma() { |
| 1003 | const char code[] = "_Pragma(\"abc\") int x;"; |
| 1004 | const Settings s_c89 = settingsBuilder().c(Standards::C89).build(); |
| 1005 | ASSERT_EQUALS("_Pragma ( \"abc\" ) int x ;", tokenizeAndStringify(code, s_c89, false)); |
| 1006 | const Settings s_clatest; |
| 1007 | ASSERT_EQUALS("int x ;", tokenizeAndStringify(code, s_clatest, false)); |
| 1008 | |
| 1009 | const Settings s_cpp03 = settingsBuilder().cpp(Standards::CPP03).build(); |
| 1010 | ASSERT_EQUALS("_Pragma ( \"abc\" ) int x ;", tokenizeAndStringify(code, s_cpp03, true)); |
| 1011 | const Settings s_cpplatest; |
| 1012 | ASSERT_EQUALS("int x ;", tokenizeAndStringify(code, s_cpplatest, true)); |
| 1013 | } |
| 1014 | |
| 1015 | void foreach () { |
| 1016 | // #3690,#5154 |