You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/06/25 04:37:57 UTC

svn commit: r957786 - in /commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition: ./ TestConditionalTransition.xml

Author: jbeard
Date: Fri Jun 25 02:37:57 2010
New Revision: 957786

URL: http://svn.apache.org/viewvc?rev=957786&view=rev
Log:
Created test for conditional transitions.

Added:
    commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/
    commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml   (with props)

Added: commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml?rev=957786&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml (added)
+++ commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml Fri Jun 25 02:37:57 2010
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<scxml 
+	xmlns="http://www.w3.org/2005/07/scxml"
+	version="1.0"
+	profile="ecmascript">
+
+	<initial>
+		<transition target="a"/>
+	</initial>
+
+	<state id="a">
+		<transition target="b"/>
+	</state>
+
+	<state id="b">
+		<transition target="c" event="t1"/>
+	</state>
+
+	<state id="c">
+		<transition target="d1"/>
+		<transition target="d2"/>
+	</state>
+
+	<state id="d1">
+		<transition target="e1" event="t2"/>
+		<transition target="e2" event="t2"/>
+	</state>
+
+	<state id="d2"/>
+
+	<state id="e1">
+		<transition target="f1" event="t3" cond="false"/>
+		<transition target="f2" event="t3" cond="true"/>
+	</state>
+
+	<state id="e2"/>
+
+	<state id="f1"/>
+
+	<state id="f2">
+		<transition target="g1" event="t4" cond="false"/>
+		<transition target="g2" event="t4" cond="false"/>
+		<transition target="g3" event="t4" cond="true"/>
+	</state>
+
+	<state id="g1"/>
+
+	<state id="g2"/>
+
+	<state id="g3">
+
+		<initial>
+			<transition target="h"/>
+		</initial>
+
+		<!-- this one should pass -->
+		<state id="h">
+			<transition target="i" event="t5" cond="true"/>
+		</state>
+
+		<!-- this one should not pass, and the outer transition should be taken -->
+		<state id="i">
+			<transition target="j" event="t5" cond="false"/>
+		</state>
+
+		<state id="j"/>
+
+		<transition target="final" event="t5" cond="true"/>
+	</state>
+
+	<state id="final"/>
+</scxml>
+
+

Propchange: commons/sandbox/gsoc/2010/scxml-js/branches/core-module.SCXML-137/test/conditional_transition/TestConditionalTransition.xml
------------------------------------------------------------------------------
    svn:eol-style = native