Fix compiler warning: cast truncates constant value

This commit is contained in:
Reijo Tomperi 2010-04-13 23:39:41 +03:00
parent 4a5463d533
commit 9c5e907b5c
1 changed files with 3 additions and 3 deletions

View File

@ -1827,21 +1827,21 @@ private:
void unicodeInCode()
{
const std::string filedata(std::string("a") + char(200));
const std::string filedata("a\xC8");
std::istringstream istr(filedata);
ASSERT_THROW(Preprocessor::read(istr), std::runtime_error);
}
void unicodeInComment()
{
const std::string filedata(std::string("//") + char(200));
const std::string filedata("//\xC8");
std::istringstream istr(filedata.c_str());
ASSERT_EQUALS("", Preprocessor::read(istr));
}
void unicodeInString()
{
const std::string filedata(std::string("\"") + char(200) + "\"");
const std::string filedata("\"\xC8\"");
std::istringstream istr(filedata.c_str());
ASSERT_EQUALS(filedata, Preprocessor::read(istr));
}