diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-04 17:02:35 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-06 09:31:16 (GMT) |
commit | 4d0785354d6009ad3283b4f812ee17bd1ec35113 (patch) | |
tree | f6f0b9bd39d7f99b50c45b04c0e9ec352c918de7 /Swiften/Examples | |
parent | 43ea2c0064d906c131d415bd8facc13ec95ca281 (diff) | |
download | swift-contrib-4d0785354d6009ad3283b4f812ee17bd1ec35113.zip swift-contrib-4d0785354d6009ad3283b4f812ee17bd1ec35113.tar.bz2 |
Make sure parser tester returns an error.
Diffstat (limited to 'Swiften/Examples')
-rw-r--r-- | Swiften/Examples/ParserTester/ParserTester.cpp | 5 |
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(); } |