Fix compiler warning: cast truncates constant value
This commit is contained in:
parent
4a5463d533
commit
9c5e907b5c
|
@ -1827,21 +1827,21 @@ private:
|
||||||
|
|
||||||
void unicodeInCode()
|
void unicodeInCode()
|
||||||
{
|
{
|
||||||
const std::string filedata(std::string("a") + char(200));
|
const std::string filedata("a\xC8");
|
||||||
std::istringstream istr(filedata);
|
std::istringstream istr(filedata);
|
||||||
ASSERT_THROW(Preprocessor::read(istr), std::runtime_error);
|
ASSERT_THROW(Preprocessor::read(istr), std::runtime_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unicodeInComment()
|
void unicodeInComment()
|
||||||
{
|
{
|
||||||
const std::string filedata(std::string("//") + char(200));
|
const std::string filedata("//\xC8");
|
||||||
std::istringstream istr(filedata.c_str());
|
std::istringstream istr(filedata.c_str());
|
||||||
ASSERT_EQUALS("", Preprocessor::read(istr));
|
ASSERT_EQUALS("", Preprocessor::read(istr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void unicodeInString()
|
void unicodeInString()
|
||||||
{
|
{
|
||||||
const std::string filedata(std::string("\"") + char(200) + "\"");
|
const std::string filedata("\"\xC8\"");
|
||||||
std::istringstream istr(filedata.c_str());
|
std::istringstream istr(filedata.c_str());
|
||||||
ASSERT_EQUALS(filedata, Preprocessor::read(istr));
|
ASSERT_EQUALS(filedata, Preprocessor::read(istr));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue