Permalink
Browse files

Merge pull request #39 from jp-embedded/test376

Test376
  • Loading branch information...
jp-embedded committed Jul 10, 2017
2 parents 4c241c8 + 65a0316 commit c76cb96a308e36037e8ef3d9b0ec8c0b01286ce3
Showing with 59 additions and 0 deletions.
  1. +5 −0 src/test/cpp.xsl
  2. +12 −0 src/test/test.cpp
  3. +26 −0 src/test/test376.txml
  4. +13 −0 src/vc2013/test/test.vcxproj
  5. +3 −0 src/vc2013/test/test.vcxproj.filters
View
@@ -51,6 +51,11 @@
</state>
</xsl:template>
<!-- Illegal target -->
<xsl:template match="//@conf:illegalTarget">
<xsl:attribute name="target">illegal</xsl:attribute>
</xsl:template>
<!-- datamodel -->
<xsl:template match="//@conf:datamodel">
<xsl:attribute name="datamodel">cplusplus</xsl:attribute>
View
@@ -9,6 +9,7 @@
#include "test533.h"
#include "test570.h"
#include "test375.h"
#include "test376.h"
#include "test576.h"
#include "event_list.h"
#include "event_tokens.h"
@@ -61,6 +62,17 @@ TEST(w3c, 375)
EXPECT_EQ(typeid(sc_test375::state_pass), typeid(*sc.cur_state));
}
// test that each onentry handler is a separate block.The <send> of event1 will cause an error but
// the increment to var1 should happen anyways
// todo: must support <send> for this test to work
// todo: supporting <send> correctly requires implementing an event I/O processor
TEST(w3c, 376)
{
sc_test376 sc;
sc.init();
EXPECT_EQ(typeid(sc_test376::state_pass), typeid(*sc.cur_state));
}
// test that executable content in the <initial> transition executes after the onentry handler on the state
// and before the onentry handler of the child states. Event1, event2, and event3 should occur in that order.
TEST(w3c, 412)
View
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!-- test that each onentry handler is a separate block. The <send> of event1 will cause an error but
the increment to var1 should happen anyways -->
<scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
<datamodel>
<data conf:id="1" conf:expr="1"/>
</datamodel>
<state id="s0">
<onentry>
<send conf:illegalTarget="" event="event1"/>
</onentry>
<onentry>
<conf:incrementID id="1"/>
</onentry>
<transition conf:idVal="1=2" conf:targetpass=""/>
<transition conf:targetfail=""/>
</state>
<conf:pass/>
<conf:fail/>
</scxml>
@@ -174,6 +174,19 @@ $(OutDir)scxmlcc.exe %(RelativeDir)%(Filename).scxml</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">msxsl %(RelativeDir)%(Filename)%(Extension) %(RelativeDir)cpp.xsl -o %(RelativeDir)%(Filename).scxml
$(OutDir)scxmlcc.exe %(RelativeDir)%(Filename).scxml</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">msxsl %(RelativeDir)%(Filename)%(Extension) %(RelativeDir)cpp.xsl -o %(RelativeDir)%(Filename).scxml
$(OutDir)scxmlcc.exe %(RelativeDir)%(Filename).scxml</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RelativeDir)%(Filename).h</Outputs>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RelativeDir)%(Filename).h</Outputs>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkObjects>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">msxsl/scxmlcc %(FullPath)</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">msxsl/scxmlcc %(FullPath)</Message>
</CustomBuild>
<CustomBuild Include="..\..\test\test376.txml">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">msxsl %(RelativeDir)%(Filename)%(Extension) %(RelativeDir)cpp.xsl -o %(RelativeDir)%(Filename).scxml
$(OutDir)scxmlcc.exe %(RelativeDir)%(Filename).scxml</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">msxsl %(RelativeDir)%(Filename)%(Extension) %(RelativeDir)cpp.xsl -o %(RelativeDir)%(Filename).scxml
$(OutDir)scxmlcc.exe %(RelativeDir)%(Filename).scxml</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RelativeDir)%(Filename).h</Outputs>
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkObjects>
@@ -65,5 +65,8 @@
<CustomBuild Include="..\..\test\test375.txml">
<Filter>Source Files</Filter>
</CustomBuild>
<CustomBuild Include="..\..\test\test376.txml">
<Filter>Source Files</Filter>
</CustomBuild>
</ItemGroup>
</Project>

0 comments on commit c76cb96

Please sign in to comment.