diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
commit | 26183abd9acd44a0382e55cc985795ee7c526aed (patch) | |
tree | a9d9289397b65892dbad037d02460cf2d04597fb /test/src | |
parent | bd45c688b3d3aad5d62b85457ce943eaadf989ae (diff) | |
download | uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.zip uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.gz uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.bz2 |
Updated W3C tests and bug-fixes
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/test-arabica-xpath.cpp | 2 | ||||
-rw-r--r-- | test/src/test-datamodel.cpp | 3 | ||||
-rw-r--r-- | test/src/test-w3c.cpp | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/test/src/test-arabica-xpath.cpp b/test/src/test-arabica-xpath.cpp index ced1de3..408cc2b 100644 --- a/test/src/test-arabica-xpath.cpp +++ b/test/src/test-arabica-xpath.cpp @@ -52,7 +52,7 @@ public: virtual Arabica::XPath::XPathValue<string_type, string_adaptor> resolveVariable(const string_type& /* namespace_uri */, const string_type& name) const { using namespace Arabica::XPath; - typename VarMap::const_iterator n = map_.find(name); + VarMap::const_iterator n = map_.find(name); if(n == map_.end()) throw UnboundVariableException(string_adaptor::asStdString(name)); return XPathValue<string_type, string_adaptor>(new StringValue<string_type, string_adaptor>((*n).second)); diff --git a/test/src/test-datamodel.cpp b/test/src/test-datamodel.cpp index b0ed107..773fe7f 100644 --- a/test/src/test-datamodel.cpp +++ b/test/src/test-datamodel.cpp @@ -19,7 +19,8 @@ int main(int argc, char** argv) { WSAStartup(MAKEWORD(2, 2), &wsaData); #endif - DataModel dm(Factory::getInstance()->createDataModel("ecmascript", NULL)); + Interpreter interpreter = Interpreter::fromXML("<scxml></scxml>"); + DataModel dm(Factory::getInstance()->createDataModel("ecmascript", interpreter.getImpl().get())); dm.evalAsString("var foo = 12"); { diff --git a/test/src/test-w3c.cpp b/test/src/test-w3c.cpp index f18b339..1600c27 100644 --- a/test/src/test-w3c.cpp +++ b/test/src/test-w3c.cpp @@ -98,8 +98,11 @@ void printUsageAndExit() { class W3CStatusMonitor : public uscxml::InterpreterMonitor { void beforeCompletion(uscxml::Interpreter interpreter) { Arabica::XPath::NodeSet<std::string> config = interpreter.getConfiguration(); - if (config.size() == 1 && boost::iequals(ATTR(config[0], "id"), "pass")) + if (config.size() == 1 && boost::iequals(ATTR(config[0], "id"), "pass")) { + std::cout << "TEST SUCCEEDED" << std::endl; exit(EXIT_SUCCESS); + } + std::cout << "TEST FAILED" << std::endl; exit(EXIT_FAILURE); } }; |