summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-04 17:02:35 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-06 09:31:16 (GMT)
commit4d0785354d6009ad3283b4f812ee17bd1ec35113 (patch)
treef6f0b9bd39d7f99b50c45b04c0e9ec352c918de7
parent43ea2c0064d906c131d415bd8facc13ec95ca281 (diff)
downloadswift-4d0785354d6009ad3283b4f812ee17bd1ec35113.zip
swift-4d0785354d6009ad3283b4f812ee17bd1ec35113.tar.bz2
Make sure parser tester returns an error.
-rw-r--r--Swiften/Examples/ParserTester/ParserTester.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Examples/ParserTester/ParserTester.cpp b/Swiften/Examples/ParserTester/ParserTester.cpp
index 3cc87e1..61c0eae 100644
--- a/Swiften/Examples/ParserTester/ParserTester.cpp
+++ b/Swiften/Examples/ParserTester/ParserTester.cpp
@@ -44,7 +44,10 @@ int main(int argc, char* argv[]) {
while (!myfile.eof()) {
getline (myfile,line);
std::cout << "Parsing: " << line << std::endl;
- tester.parse(line);
+ if (!tester.parse(line)) {
+ std::cerr << "PARSE ERROR" << std::endl;
+ return -1;
+ }
}
myfile.close();
}