Preprocessor: fixed tests
This commit is contained in:
parent
b37cf11d20
commit
2ffb3baaed
|
@ -1601,7 +1601,7 @@ private:
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
ASSERT_EQUALS("\n\n$int a = 4; int b = 5;\n", actual[""]);
|
ASSERT_EQUALS("\n\n$int a = 4; int b = 5;\n", actual[""]);
|
||||||
#else
|
#else
|
||||||
ASSERT_EQUALS("\nint b = 5;\nint a = 4;\\\n", actual[""]);
|
ASSERT_EQUALS("\nint b = 5;\n$int a = 4;\\\n", actual[""]);
|
||||||
#endif
|
#endif
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
@ -3428,8 +3428,8 @@ private:
|
||||||
void macroChar() {
|
void macroChar() {
|
||||||
const char filedata[] = "#define X 1\nX\n";
|
const char filedata[] = "#define X 1\nX\n";
|
||||||
ASSERT_EQUALS("\n$1\n", OurPreprocessor::expandMacros(filedata,NULL));
|
ASSERT_EQUALS("\n$1\n", OurPreprocessor::expandMacros(filedata,NULL));
|
||||||
OurPreprocessor::macroChar = '¤';
|
OurPreprocessor::macroChar = char(1);
|
||||||
ASSERT_EQUALS("\n¤1\n", OurPreprocessor::expandMacros(filedata,NULL));
|
ASSERT_EQUALS("\n" + std::string(char(1),1U) + "1\n", OurPreprocessor::expandMacros(filedata,NULL));
|
||||||
OurPreprocessor::macroChar = '$';
|
OurPreprocessor::macroChar = '$';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue