Skip to content
Snippets Groups Projects
Commit 4473670a authored by Mirko Wächter's avatar Mirko Wächter
Browse files

Fixed XMLWriterTest

parent 8454443d
No related branches found
No related tags found
No related merge requests found
...@@ -157,7 +157,7 @@ BOOST_AUTO_TEST_CASE(testXmlWriter) ...@@ -157,7 +157,7 @@ BOOST_AUTO_TEST_CASE(testXmlWriter)
QString actualResult = writer.getXmlString(false); QString actualResult = writer.getXmlString(false);
std::cout << actualResult << std::endl; std::cout << actualResult << std::endl;
// Once we have C++0x support, we should use a raw string and turn on indentation // Once we have C++0x support, we should use a raw string and turn on indentation
QString correctResult = "<?xml version=\"1.0\" encoding=\"utf-8\"?><State version=\"1.0\" name=\"RootStateName\" uuid=\"09F54A1A-3A29-4560-B20C-299069288823\" width=\"123\" height=\"456\"><Description>Test description\nLine 2</Description><InputParameters><Parameter name=\"InputParameter1Name\" type=\"string\" optional=\"no\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"type\":-2125418521,\"value\":\"DefaultValue\"}}'><Description>Input Parameter 1 Description</Description></Parameter><Parameter name=\"InputParameter2Name\" type=\"float\" optional=\"yes\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"type\":1826906882,\"value\":13.36999988555908}}'/></InputParameters><OutputParameters><Parameter name=\"OutputParameter1Name\" type=\"string\" optional=\"yes\"/></OutputParameters><LocalParameters><Parameter name=\"LocalParameter1Name\" type=\"bool\" optional=\"no\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"type\":-869238820,\"value\":false}}'/></LocalParameters><Substates><EndState name=\"EndSubstateName\" event=\"Success\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/><LocalState name=\"LocalSubstateName\" refuuid=\"CF3662A8-9234-46BD-82C1-856344108823\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/><RemoteState name=\"RemoteSubstateName\" refuuid=\"148C7D1D-1DB4-4A67-893F-D22D36A88823\" proxyName=\"RemoteSubstateProxyName\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/></Substates><Events><Event name=\"Success\"><Description>Event Description</Description></Event><Event name=\"Failure\"/></Events><StartState substateName=\"LocalSubstateName\"><ParameterMappings><ParameterMapping sourceType=\"Parent\" from=\"StartParameterMapping1SourceKey\" to=\"StartParameterMapping1DestinationKey\"/><ParameterMapping sourceType=\"Output\" from=\"StartParameterMapping2SourceKey\" to=\"StartParameterMapping2DestinationKey\"/></ParameterMappings></StartState><Transitions><Transition from=\"LocalSubstateName\" to=\"RemoteSubstateName\" eventName=\"Transition1EventName\"><ParameterMappings><ParameterMapping sourceType=\"Event\" from=\"Transition1ParameterMappingSourceKey\" to=\"Transition1ParameterMappingDestinationKey\"/></ParameterMappings><SupportPoints><SupportPoint posX=\"12\" posY=\"34\"/><SupportPoint posX=\"56\" posY=\"78\"/></SupportPoints></Transition><Transition from=\"RemoteSubstateName\" to=\"EndSubstateName\" eventName=\"Transition2EventName\"><ParameterMappings/><SupportPoints/></Transition></Transitions></State>"; QString correctResult = "<?xml version=\"1.0\" encoding=\"utf-8\"?><State version=\"1.0\" name=\"RootStateName\" uuid=\"09F54A1A-3A29-4560-B20C-299069288823\" width=\"123\" height=\"456\"><Description>Test description\nLine 2</Description><InputParameters><Parameter name=\"InputParameter1Name\" type=\"string\" optional=\"no\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"typeName\":\"::armarx::StringVariantData\",\"value\":\"DefaultValue\"}}'><Description>Input Parameter 1 Description</Description></Parameter><Parameter name=\"InputParameter2Name\" type=\"float\" optional=\"yes\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"typeName\":\"::armarx::FloatVariantData\",\"value\":13.36999988555908}}'/></InputParameters><OutputParameters><Parameter name=\"OutputParameter1Name\" type=\"string\" optional=\"yes\"/></OutputParameters><LocalParameters><Parameter name=\"LocalParameter1Name\" type=\"bool\" optional=\"no\" default='{\"type\":\"::armarx::SingleVariantBase\",\"variant\":{\"typeName\":\"::armarx::BoolVariantData\",\"value\":false}}'/></LocalParameters><Substates><EndState name=\"EndSubstateName\" event=\"Success\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/><LocalState name=\"LocalSubstateName\" refuuid=\"CF3662A8-9234-46BD-82C1-856344108823\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/><RemoteState name=\"RemoteSubstateName\" refuuid=\"148C7D1D-1DB4-4A67-893F-D22D36A88823\" proxyName=\"RemoteSubstateProxyName\" left=\"12\" top=\"34\" boundingSquareSize=\"50\"/></Substates><Events><Event name=\"Success\"><Description>Event Description</Description></Event><Event name=\"Failure\"/></Events><StartState substateName=\"LocalSubstateName\"><ParameterMappings><ParameterMapping sourceType=\"Parent\" from=\"StartParameterMapping1SourceKey\" to=\"StartParameterMapping1DestinationKey\"/><ParameterMapping sourceType=\"Output\" from=\"StartParameterMapping2SourceKey\" to=\"StartParameterMapping2DestinationKey\"/></ParameterMappings></StartState><Transitions><Transition from=\"LocalSubstateName\" to=\"RemoteSubstateName\" eventName=\"Transition1EventName\"><ParameterMappings><ParameterMapping sourceType=\"Event\" from=\"Transition1ParameterMappingSourceKey\" to=\"Transition1ParameterMappingDestinationKey\"/></ParameterMappings><SupportPoints><SupportPoint posX=\"12\" posY=\"34\"/><SupportPoint posX=\"56\" posY=\"78\"/></SupportPoints></Transition><Transition from=\"RemoteSubstateName\" to=\"EndSubstateName\" eventName=\"Transition2EventName\"><ParameterMappings/><SupportPoints/></Transition></Transitions></State>";
BOOST_CHECK_EQUAL(actualResult, correctResult); BOOST_CHECK_EQUAL(actualResult, correctResult);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment