@@ -409,9 +409,9 @@ class TestErrorLogger : public TestFixture {
409409 message += " <location file=\" bar.cpp\" line=\" 8\" column=\" 1\" info=\"\\ 303\\ 244\" />\n " ;
410410 message += " <location file=\" foo.cpp\" line=\" 5\" column=\" 1\" />\n " ;
411411 message += " <location file=\" dir1/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
412- message += " <location file=\" dir2/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
413- message += " <location file=\" dir3/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
414- message += " <location file=\" dir4/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
412+ message += " <location origfile= \" dir2 \\ a.cpp \" file=\" dir2/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
413+ message += " <location origfile= \" dir/a.cpp \" file=\" dir3/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
414+ message += " <location origfile= \" dir/a.cpp \" file=\" dir4/a.cpp\" line=\" 1\" column=\" 1\" />\n " ;
415415 message += " </error>" ;
416416 ASSERT_EQUALS (message, msg.toXML ());
417417 }
@@ -443,7 +443,7 @@ class TestErrorLogger : public TestFixture {
443443 " hash=\" 456\" "
444444 " >\n "
445445 " <location file=\" bar.cpp\" line=\" 8\" column=\" 1\" />\n "
446- " <location file=\" foo.cpp\" line=\" 5\" column=\" 2\" />\n "
446+ " <location origfile= \" proj/foo.cpp \" file=\" foo.cpp\" line=\" 5\" column=\" 2\" />\n "
447447 " </error>" ;
448448 tinyxml2::XMLDocument doc;
449449 ASSERT (doc.Parse (xmldata, sizeof (xmldata)) == tinyxml2::XML_SUCCESS);
@@ -458,9 +458,11 @@ class TestErrorLogger : public TestFixture {
458458 ASSERT_EQUALS (" Verbose error" , msg.verboseMessage ());
459459 ASSERT_EQUALS (456u , msg.hash );
460460 ASSERT_EQUALS (2u , msg.callStack .size ());
461+ ASSERT_EQUALS (" proj/foo.cpp" , msg.callStack .front ().getOrigFile (false ));
461462 ASSERT_EQUALS (" foo.cpp" , msg.callStack .front ().getfile (false ));
462463 ASSERT_EQUALS (5 , msg.callStack .front ().line );
463464 ASSERT_EQUALS (2u , msg.callStack .front ().column );
465+ ASSERT_EQUALS (" bar.cpp" , msg.callStack .back ().getOrigFile (false ));
464466 ASSERT_EQUALS (" bar.cpp" , msg.callStack .back ().getfile (false ));
465467 ASSERT_EQUALS (8 , msg.callStack .back ().line );
466468 ASSERT_EQUALS (1u , msg.callStack .back ().column );
0 commit comments