From 9c5e907b5c476bb18516db7c377c9ea58b058c7f Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Tue, 13 Apr 2010 23:39:41 +0300 Subject: [PATCH] Fix compiler warning: cast truncates constant value --- test/testpreprocessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 27bb528ed..cb7904182 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -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)); }