🐛 Fixed compiling with gcc 5
This commit is contained in:
parent
7ccd404ba9
commit
e83556ae74
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,5 +4,5 @@ cmake-build-debug/
|
||||
\.idea/
|
||||
docs/node_modules/
|
||||
docs/doc/
|
||||
|
||||
build/
|
||||
_build/
|
@ -386,17 +386,16 @@ moFileReader::eErrorCode moFileReader::ExportAsHTML(std::string infile, std::str
|
||||
std::ofstream stream(htmlfile.c_str());
|
||||
if ( stream.is_open() )
|
||||
{
|
||||
stream << R"(<!DOCTYPE HTML PUBLIC "- //W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">)"
|
||||
<< std::endl;
|
||||
stream << "<!DOCTYPE HTML PUBLIC \"- //W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" << std::endl;
|
||||
stream << "<html><head><style type=\"text/css\">\n" << std::endl;
|
||||
stream << css << std::endl;
|
||||
stream << "</style>" << std::endl;
|
||||
stream << R"(<meta http-equiv="content-type" content="text/html; charset=utf-8">)" << std::endl;
|
||||
stream << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" << std::endl;
|
||||
stream << "<title>Dump of " << fname << "</title></head>" << std::endl;
|
||||
stream << "<body>" << std::endl;
|
||||
stream << "<center>" <<std::endl;
|
||||
stream << "<h1>" << fname << "</h1>" << std::endl;
|
||||
stream << R"(<table border="1"><th colspan="2">Project Info</th>)" << std::endl;
|
||||
stream << "<table border=\"1\"><th colspan=\"2\">Project Info</th>" << std::endl;
|
||||
|
||||
std::stringstream parsee;
|
||||
parsee << reader.Lookup("");
|
||||
@ -418,7 +417,7 @@ moFileReader::eErrorCode moFileReader::ExportAsHTML(std::string infile, std::str
|
||||
stream << "<hr noshade/>" << std::endl;
|
||||
|
||||
// Now output the content
|
||||
stream << R"(<table border="1"><th colspan="2">Content</th>)" << std::endl;
|
||||
stream << "<table border=\"1\"><th colspan=\"2\">Content</th>" << std::endl;
|
||||
for ( moLookupList::const_iterator it = reader.m_lookup.begin();
|
||||
it != reader.m_lookup.end(); it++)
|
||||
{
|
||||
@ -430,7 +429,7 @@ moFileReader::eErrorCode moFileReader::ExportAsHTML(std::string infile, std::str
|
||||
stream << "</table><br/>" << std::endl;
|
||||
|
||||
stream << "</center>" << std::endl;
|
||||
stream << R"(<div class="copyleft">File generated by <a href="https://github.com/AnotherFoxGuy/MofileReader" target="_blank">moFileReaderSDK</a></div>)" << std::endl;
|
||||
stream << "<div class=\"copyleft\">File generated by <a href=\"https://github.com/AnotherFoxGuy/MofileReader\" target=\"_blank\">moFileReaderSDK</a></div>" << std::endl;
|
||||
stream << "</body></html>" << std::endl;
|
||||
stream.close();
|
||||
}
|
||||
|
@ -6,16 +6,14 @@ using namespace moFileLib;
|
||||
#define _L(str) moFileReaderSingleton::GetInstance().Lookup(str)
|
||||
#define _LC(ctx,str) moFileReaderSingleton::GetInstance().LookupWithContext(ctx,str)
|
||||
|
||||
auto testMo = "test.mo";
|
||||
|
||||
TEST(moFileReader, setup)
|
||||
{
|
||||
EXPECT_EQ(moFileReaderSingleton::GetInstance().ReadFile(testMo), moFileLib::moFileReader::EC_SUCCESS);
|
||||
EXPECT_EQ(moFileReaderSingleton::GetInstance().ReadFile("test.mo"), moFileLib::moFileReader::EC_SUCCESS);
|
||||
}
|
||||
|
||||
TEST(moFileReader, Lookup)
|
||||
{
|
||||
moFileReaderSingleton::GetInstance ().ReadFile (testMo);
|
||||
moFileReaderSingleton::GetInstance ().ReadFile ("test.mo");
|
||||
/* This is the first comment. */
|
||||
EXPECT_EQ ("Text Nederlands Een", _L ("String English One"));
|
||||
/* This is the second comment. */
|
||||
@ -27,7 +25,7 @@ TEST(moFileReader, Lookup)
|
||||
|
||||
TEST (moFileReader, LookupWithContext)
|
||||
{
|
||||
moFileReaderSingleton::GetInstance ().ReadFile (testMo);
|
||||
moFileReaderSingleton::GetInstance ().ReadFile ("test.mo");
|
||||
/* This is the first comment. */
|
||||
EXPECT_EQ ("Text Nederlands Een", _LC ("TEST|String|1", "String English"));
|
||||
/* This is the second comment. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user