瀏覽代碼

Update python test framework a bit.

Joeri Exelmans 6 年之前
父節點
當前提交
76058129c1
共有 100 個文件被更改,包括 3037 次插入540 次删除
  1. 1 0
      .gitignore
  2. 3 3
      src/python_sccd/python_sccd_compiler/sccdc.py
  3. 17 57
      test/Makefile
  4. 8 0
      test/README.md
  5. 0 42
      test/csharp_tests/CSharpTests.cs
  6. 0 51
      test/csharp_tests/CodeCompiler.cs
  7. 0 27
      test/csharp_tests/Properties/AssemblyInfo.cs
  8. 0 45
      test/csharp_tests/PythonTests.cs
  9. 0 45
      test/csharp_tests/TestEvent.cs
  10. 0 151
      test/csharp_tests/TestsBase.cs
  11. 0 68
      test/csharp_tests/csharp_tests.csproj
  12. 0 44
      test/csharp_tests/csharp_tests.sln
  13. 13 7
      test/run_tests.py
  14. 27 0
      test/scxml_test_suite/test144.txml
  15. 34 0
      test/scxml_test_suite/test147.txml
  16. 35 0
      test/scxml_test_suite/test148.txml
  17. 28 0
      test/scxml_test_suite/test149.txml
  18. 45 0
      test/scxml_test_suite/test150.txml
  19. 45 0
      test/scxml_test_suite/test151.txml
  20. 52 0
      test/scxml_test_suite/test152.txml
  21. 39 0
      test/scxml_test_suite/test153.txml
  22. 30 0
      test/scxml_test_suite/test155.txml
  23. 32 0
      test/scxml_test_suite/test156.txml
  24. 27 0
      test/scxml_test_suite/test158.txml
  25. 24 0
      test/scxml_test_suite/test159.txml
  26. 23 0
      test/scxml_test_suite/test172.txml
  27. 24 0
      test/scxml_test_suite/test173.txml
  28. 24 0
      test/scxml_test_suite/test174.txml
  29. 30 0
      test/scxml_test_suite/test175.txml
  30. 33 0
      test/scxml_test_suite/test176.txml
  31. 31 0
      test/scxml_test_suite/test178.txml
  32. 21 0
      test/scxml_test_suite/test179.txml
  33. 24 0
      test/scxml_test_suite/test183.txml
  34. 26 0
      test/scxml_test_suite/test185.txml
  35. 34 0
      test/scxml_test_suite/test186.txml
  36. 36 0
      test/scxml_test_suite/test187.txml
  37. 25 0
      test/scxml_test_suite/test189.txml
  38. 38 0
      test/scxml_test_suite/test190.txml
  39. 34 0
      test/scxml_test_suite/test191.txml
  40. 58 0
      test/scxml_test_suite/test192.txml
  41. 29 0
      test/scxml_test_suite/test193.txml
  42. 26 0
      test/scxml_test_suite/test194.txml
  43. 23 0
      test/scxml_test_suite/test198.txml
  44. 22 0
      test/scxml_test_suite/test199.txml
  45. 22 0
      test/scxml_test_suite/test200.txml
  46. 25 0
      test/scxml_test_suite/test201.txml
  47. 34 0
      test/scxml_test_suite/test205.txml
  48. 60 0
      test/scxml_test_suite/test207.txml
  49. 25 0
      test/scxml_test_suite/test208.txml
  50. 28 0
      test/scxml_test_suite/test210.txml
  51. 33 0
      test/scxml_test_suite/test215.txml
  52. 26 0
      test/scxml_test_suite/test216.txml
  53. 25 0
      test/scxml_test_suite/test220.txml
  54. 33 0
      test/scxml_test_suite/test223.txml
  55. 35 0
      test/scxml_test_suite/test224.txml
  56. 42 0
      test/scxml_test_suite/test225.txml
  57. 27 0
      test/scxml_test_suite/test226.txml
  58. 37 0
      test/scxml_test_suite/test228.txml
  59. 46 0
      test/scxml_test_suite/test229.txml
  60. 66 0
      test/scxml_test_suite/test230.txml
  61. 44 0
      test/scxml_test_suite/test232.txml
  62. 39 0
      test/scxml_test_suite/test233.txml
  63. 70 0
      test/scxml_test_suite/test234.txml
  64. 27 0
      test/scxml_test_suite/test235.txml
  65. 43 0
      test/scxml_test_suite/test236.txml
  66. 45 0
      test/scxml_test_suite/test237.txml
  67. 36 0
      test/scxml_test_suite/test239.txml
  68. 71 0
      test/scxml_test_suite/test240.txml
  69. 102 0
      test/scxml_test_suite/test241.txml
  70. 57 0
      test/scxml_test_suite/test242.txml
  71. 40 0
      test/scxml_test_suite/test243.txml
  72. 43 0
      test/scxml_test_suite/test244.txml
  73. 38 0
      test/scxml_test_suite/test245.txml
  74. 26 0
      test/scxml_test_suite/test247.txml
  75. 46 0
      test/scxml_test_suite/test250.txml
  76. 51 0
      test/scxml_test_suite/test252.txml
  77. 83 0
      test/scxml_test_suite/test253.txml
  78. 21 0
      test/scxml_test_suite/test276.txml
  79. 32 0
      test/scxml_test_suite/test277.txml
  80. 22 0
      test/scxml_test_suite/test278.txml
  81. 25 0
      test/scxml_test_suite/test279.txml
  82. 34 0
      test/scxml_test_suite/test280.txml
  83. 23 0
      test/scxml_test_suite/test286.txml
  84. 23 0
      test/scxml_test_suite/test287.txml
  85. 49 0
      test/scxml_test_suite/test294.txml
  86. 32 0
      test/scxml_test_suite/test298.txml
  87. 17 0
      test/scxml_test_suite/test301.txml
  88. 20 0
      test/scxml_test_suite/test302.txml
  89. 25 0
      test/scxml_test_suite/test303.txml
  90. 18 0
      test/scxml_test_suite/test304.txml
  91. 43 0
      test/scxml_test_suite/test307.txml
  92. 16 0
      test/scxml_test_suite/test309.txml
  93. 23 0
      test/scxml_test_suite/test310.txml
  94. 22 0
      test/scxml_test_suite/test311.txml
  95. 25 0
      test/scxml_test_suite/test312.txml
  96. 26 0
      test/scxml_test_suite/test313.txml
  97. 39 0
      test/scxml_test_suite/test314.txml
  98. 31 0
      test/scxml_test_suite/test318.txml
  99. 25 0
      test/scxml_test_suite/test319.txml
  100. 0 0
      test/scxml_test_suite/test321.txml

+ 1 - 0
.gitignore

@@ -11,6 +11,7 @@ csharp_tests/test-results
 csharp_tests/bin
 src/build
 **/*target*
+test/build/
 **/*.lprof
 doc/_build
 .project

+ 3 - 3
src/python_sccd/python_sccd_compiler/sccdc.py

@@ -15,6 +15,7 @@ from sccd.compiler.javascript_writer import JavascriptWriter
 from sccd.compiler.python_writer import PythonWriter
 
 def generate(input_file, output_file, target_language, platform):
+
 	sccd = xmlToSccd(input_file)
 
 	if not target_language:
@@ -23,8 +24,7 @@ def generate(input_file, output_file, target_language, platform):
 		else:
 			target_language = "python" # default
 	elif sccd.language and target_language != sccd.language:
-		Logger.showError("Diagram specifies target language as \"" + sccd.language + "\", but language option of compiler has been set to \"" + target_language + "\". No output has been generated.")
-		return
+		raise CompilerException("Diagram specifies target language as \"" + sccd.language + "\", but language option of compiler has been set to \"" + target_language + "\". No output has been generated.")
 
 	if target_language == "python" and not output_file.endswith(".py") :
 		output_file += ".py"
@@ -51,8 +51,8 @@ def sccdToGeneric(sccd, platform):
 	return generic
 
 def genericToTarget(generic, target_language, output_file):
+	f = FileWriter(output_file)
 	try:
-		f = FileWriter(output_file)
 		if target_language == "javascript":
 			writer = JavascriptWriter(f)
 		elif target_language == "python":

+ 17 - 57
test/Makefile

@@ -1,63 +1,33 @@
 .PHONY: all all_javascript all_python clean clean_javascript clean_python test test_javascript test_python help
 
-SCCDC = python -m sccd.compiler.sccdc
+SCCDC = python3 -m sccd.compiler.sccdc
 
-PYTHON = python
+PYTHON = python3
 BROWSER = firefox 2>/dev/null -new-window
 
 JS_FLAGS = -l javascript -p eventloop
 PY_FLAGS = -l python -p threads
 
-JS_EXT = js
-PY_EXT = py
+SRC_DIRS = semantics
+BUILD_DIR = build
 
-SRC_DIR = src
-TARGET_DIR_PREFIX = target_
-JS_TARGET_DIR = $(TARGET_DIR_PREFIX)js
-PY_TARGET_DIR = $(TARGET_DIR_PREFIX)py
+SOURCES = $(shell find $(SRC_DIRS) -type f -name *\.xml)
 
-
-#SOURCES = after.xml associate_event.xml correct_duplicate_state_id.xml enter_exit_hierarchy.xml guard.xml history_deep.xml history_parallel_deep.xml history.xml inner_first.xml instate.xml multiple_target.xml object_manager.xml outer_first.xml parallel_history_2.xml parallel_history.xml parallel.xml
-
-SRC_SUBDIRS = $(shell ls $(SRC_DIR))
-JS_TARGET_SUBDIRS = $(SRC_SUBDIRS:%=$(JS_TARGET_DIR)/%)
-PY_TARGET_SUBDIRS = $(SRC_SUBDIRS:%=$(PY_TARGET_DIR)/%)
-PY_MODULES = $(PY_TARGET_DIR)/__init__.py $(PY_TARGET_SUBDIRS:%=%/__init__.py)
-
-SOURCES = $(shell find src -type f -name *\.xml)
-
-#SOURCES_JS = inheritance_js.xml # javascript-only tests
-#SOURCES_PY = #inheritance_py.xml # python-only tests
-
-JS_TARGETS = $(SOURCES:$(SRC_DIR)/%.xml=$(JS_TARGET_DIR)/%.js) $(SOURCES_JS:$(SRC_DIR)/%.xml=$(JS_TARGET_DIR)/%.js)
-
-PY_TARGETS = $(SOURCES:$(SRC_DIR)/%.xml=$(PY_TARGET_DIR)/%.py) $(SOURCES_PY:$(SRC_DIR)/%.xml=$(PY_TARGET_DIR)/%.py)
-
-PY_BYPRODUCTS = $(PY_TARGETS:%.py=%.pyc) $(PY_MODULES:%.py=%.pyc)
-
-##
-##Target             Description
-##
+JS_TARGETS = $(addprefix $(BUILD_DIR)/, $(SOURCES:%.xml=%.js))
+PY_TARGETS = $(addprefix $(BUILD_DIR)/, $(SOURCES:%.xml=%.py))
 
 all:              ## Build all tests.
 all: all_javascript all_python
 
 all_javascript:   ## Build Javascript tests.
-all_javascript: $(JS_TARGET_SUBDIRS) $(JS_TARGETS) $(JS_ONLY_TARGETS)
+all_javascript: $(JS_TARGETS) $(JS_TARGETS) $(JS_ONLY_TARGETS)
 
 all_python:       ## Build Python tests.
-all_python: $(PY_TARGET_SUBDIRS) $(PY_TARGETS) $(PY_ONLY_TARGETS) $(PY_MODULES)
+all_python: $(PY_TARGETS)
 
 clean:            ## Remove all build artifacts.
-clean: clean_javascript clean_python
-
-clean_javascript: ## Remove Javascript build artifacts.
-	-rm -f  $(JS_TARGETS) $(JS_ONLY_TARGETS)
-	-rmdir $(JS_TARGET_SUBDIRS) $(JS_TARGET_DIR)
-
-clean_python:     ## Remove Python build artifacts.
-	-rm -f  $(PY_TARGETS) $(PY_ONLY_TARGETS) $(PY_BYPRODUCTS) $(PY_MODULES)
-	-rmdir $(PY_TARGET_SUBDIRS) $(PY_TARGET_DIR)
+clean:
+	rm -rf $(BUILD_DIR)
 
 test:             ## Run all tests.
 test: test_javascript test_python
@@ -70,23 +40,13 @@ test_python:      ## Run Python tests.
 test_python: all_python run_tests.py
 	$(PYTHON) run_tests.py
 
-$(JS_TARGET_DIR)/%.js :: $(SRC_DIR)/%.xml
-	$(SCCDC) $(JS_FLAGS) -o $@ $<
-
-$(PY_TARGET_DIR)/%.py :: $(SRC_DIR)/%.xml
-	$(SCCDC) $(PY_FLAGS) -o $@ $<
-
-$(JS_TARGET_DIR) $(PY_TARGET_DIR):
-	-mkdir $@
-
-$(PY_TARGET_SUBDIRS): $(PY_TARGET_DIR)
-	-mkdir $@
-
-$(JS_TARGET_SUBDIRS): $(JS_TARGET_DIR)
-	-mkdir $@
+$(BUILD_DIR)/%.py : %.xml
+	mkdir -p $(dir $@)
+	-$(SCCDC) $(PY_FLAGS) -o $@ $<
 
-$(PY_MODULES):
-	touch $@
+$(BUILD_DIR)/%.js : %.xml
+	mkdir -p $(dir $@)
+	-$(SCCDC) $(JS_FLAGS) -o $@ $<
 
 help:             ## Show this help.
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

+ 8 - 0
test/README.md

@@ -0,0 +1,8 @@
+The Python file `test.py` replaces the old `run_tests.py`. It takes test input files (in SCCD XML format) as parameter. It compiles tests and runs them.
+
+#### Example
+To run the "semantics" tests:
+```
+python test.py semantics
+```
+

+ 0 - 42
test/csharp_tests/CSharpTests.cs

@@ -1,42 +0,0 @@
-using System;
-using csharp_sccd_compiler;
-using NUnit.Framework;
-
-namespace csharp_tests
-{
-    [TestFixture]
-    [Category("CSharp")]
-    public class CSharpTests : TestsBase
-    {
-        [TestFixtureSetUp]
-        public void setLogger()
-        {
-            Logger.verbose = 1;
-        }
-
-        protected override bool generate(string file_path, string expected_exception)
-        {
-            TestDelegate generation_delegate = () => Compiler.generate(file_path, this.path_generated_code, CodeGenerator.Platform.THREADS);
-
-            if (expected_exception == null)
-                generation_delegate();
-            else
-            {
-                Type expected_exception_type = null;
-                if (expected_exception == "CompilerException")
-                    expected_exception_type = typeof(CompilerException);
-                else if (expected_exception == "TransitionException")
-                    expected_exception_type = typeof(TransitionException);
-                else
-                    Assert.Fail("Invalid value for the exception attribute.");
-
-                Exception throwed_exception = Assert.Catch<Exception>(generation_delegate, "Expected an exception but none was throwed.").GetBaseException();
-                Assert.IsInstanceOf(expected_exception_type, throwed_exception, 
-                                        string.Format("Expected exception of type {0} but got an exception of type {1} instead.", expected_exception_type, throwed_exception.GetType()));
-                return false;
-            }
-            return true;
-        }
-    }
-}
-

+ 0 - 51
test/csharp_tests/CodeCompiler.cs

@@ -1,51 +0,0 @@
-using System;
-using System.IO;
-using Microsoft.CSharp;
-using System.CodeDom.Compiler;
-using System.Reflection;
-
-namespace csharp_tests
-{
-    public class CodeCompiler
-    {
-        protected CSharpCodeProvider compiler = new CSharpCodeProvider();
-        protected CompilerParameters compiler_parameters;
-
-        public CodeCompiler()
-        {
-            this.compiler_parameters = new CompilerParameters
-            {
-                WarningLevel = 0,
-                GenerateExecutable = false,
-                GenerateInMemory = true/*,
-                OutputAssembly = "Assembly.dll"*/
-            };
-        }
-
-        public void AddReferencedAssembly(string name)
-        {
-            this.compiler_parameters.ReferencedAssemblies.Add(name);
-        }
-         
-        public Assembly compileFile(string file)
-        {
-            Assembly returnAssembly = null;
-            try
-            {
-                CompilerResults results = this.compiler.CompileAssemblyFromFile(compiler_parameters, file);
-                returnAssembly = results.CompiledAssembly;
-         
-                foreach (string output in results.Output)
-                {
-                    Console.WriteLine(output);
-                }
-            }
-            catch (Exception exception)
-            {
-                Console.WriteLine(exception.Message);
-            }
-            return returnAssembly;
-        }
-    }
-}
-

+ 0 - 27
test/csharp_tests/Properties/AssemblyInfo.cs

@@ -1,27 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes. 
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("csharp_tests")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("gl3nn")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly, 
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
-

+ 0 - 45
test/csharp_tests/PythonTests.cs

@@ -1,45 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.IO;
-using NUnit.Framework;
-
-namespace csharp_tests
-{
-    [TestFixture]
-    [Category("Python")]
-    public class PythonTests : TestsBase
-    {
-
-        protected override bool generate(string file_path, string expected_exception)
-        {
-            ProcessStartInfo start_info = new ProcessStartInfo();
-            start_info.FileName = "python";
-            start_info.Arguments = string.Format("../../../python_sccd_compiler/sccdc.py {0} -o {1} -p threads -l C# -v -1", file_path, this.path_generated_code);
-            start_info.UseShellExecute = false;
-            start_info.RedirectStandardOutput = true;
-            //Print any output the compiler gave
-            using (Process process = Process.Start(start_info))
-            {
-                using (StreamReader reader = process.StandardOutput)
-                {
-                    string result = reader.ReadToEnd();
-                    Console.Write(result);
-                }
-            }
-            //Exception check
-            //If the test file expects an exception to be thrown by the compiler,
-            //we just try to compile the model and see if a file got generated.
-            //If the result file got generated, this means that no exception was thrown
-            //and thus the test should fail.
-            bool target_file_exists = File.Exists(this.path_generated_code);
-            if (expected_exception != null)
-            {
-                Assert.AreEqual(false, target_file_exists, "An exception was expected to be thrown by the compiler but the SCCD compiler completed successfully.");
-                return false; //No target file as expected, we can end the test.
-            }
-            Assert.AreEqual(true, target_file_exists, "The SCCD Compiler did not complete compilation. No generated file has been found.");
-            return true;
-        }
-    }
-}
-

+ 0 - 45
test/csharp_tests/TestEvent.cs

@@ -1,45 +0,0 @@
-using System;
-using System.Collections.Generic;
-using sccdlib;
-
-namespace csharp_tests
-{
-    public class TestEvent
-    {
-        string name;
-        string port;
-        List<string> parameters;
-
-        public TestEvent(string name, string port, List<string> parameters)
-        {
-            this.name = name;
-            this.port = port;
-            this.parameters = parameters;
-        }
-
-        public bool matches(Event output_event)
-        {
-            if (output_event == null)
-                return false;
-            if (output_event.getName() != this.name)
-                return false;
-            if (output_event.getPort() != this.port)
-                return false;
-            List<object> compare_parameters = new List<object>(output_event.getParameters());
-            if (this.parameters.Count != compare_parameters.Count)
-                return false;
-            for (int i = 0; i < this.parameters.Count; i++)
-            {
-                if (this.parameters [i] != compare_parameters[i].ToString())
-                    return false;
-            }
-            return true;
-        }
-    
-        public override string ToString()
-        {
-            return string.Format("(event name : {0}; port : {1}; parameters : [{2}])", this.name, this.port, string.Join(", ", this.parameters));
-        }
-    }
-}
-

+ 0 - 151
test/csharp_tests/TestsBase.cs

@@ -1,151 +0,0 @@
-using System;
-using System.IO;
-using System.Diagnostics;
-using System.Reflection;
-using System.Collections;
-using System.Collections.Generic;
-using System.Xml.Linq;
-using System.Linq;
-using Microsoft.CSharp.RuntimeBinder;
-using NUnit.Framework;
-using sccdlib;
-
-namespace csharp_tests
-{
-    public abstract class TestsBase
-    {
-        protected string path_generated_code;
-        protected bool keep_after_test;
-
-        protected abstract bool generate(string file_path, string expected_exception);
-
-        [Test, TestCaseSource(typeof(TestsBase),"GetTestCases")]
-        public void testXML(string file_path)
-        {
-            XElement test_xml = XDocument.Load(file_path).Root.Element("test");
-            Assert.AreNotEqual(null, test_xml, "No test data found. (A test that should just compile correctly, still needs an empthy test tag.)");
-
-            //Calculate path to output file
-            this.path_generated_code = Path.ChangeExtension(Path.GetFileName(file_path), ".cs");
-
-            this.keep_after_test = false;
-            if (File.Exists(this.path_generated_code))
-            {
-                this.keep_after_test = true;
-                File.Delete(this.path_generated_code);
-            }
-
-            string expected_exception = null;
-            if (test_xml.Attribute("exception") != null && test_xml.Attribute("exception").Value.Trim() != "")
-            {
-                expected_exception = test_xml.Attribute("exception").Value.Trim();
-            }
-
-            //Call code generator
-            if (!this.generate(file_path, expected_exception))
-                return;
-
-            //Compile generated code
-            CodeCompiler code_compiler = new CodeCompiler();
-            code_compiler.AddReferencedAssembly("System.dll");
-            code_compiler.AddReferencedAssembly("sccdlib.dll");
-            Assembly assembly = code_compiler.compileFile(this.path_generated_code);
-            Type class_type = assembly.GetType("Controller");
-
-            //Prepare expected output
-            XElement expected_xml = test_xml.Element("expected");
-            if (expected_xml == null)
-                return;
-
-            HashSet<string> output_ports = new HashSet<string>();
-            List<List<TestEvent>> expected_result = new List<List<TestEvent>>();
-
-            foreach (XElement slot_xml in expected_xml.Elements("slot"))
-            {
-                List<TestEvent> slot = new List<TestEvent>();
-                foreach (XElement event_xml in slot_xml.Elements("event"))
-                {
-                    string event_name = event_xml.Attribute("name").Value;
-                    string port = event_xml.Attribute("port").Value;
-                    List<string> parameters = new List<string>();
-                    foreach (XElement parameter_xml in event_xml.Elements("parameter"))
-                    {
-                        string parameter_value = parameter_xml.Attribute("value").Value;
-                        parameters.Add(parameter_value);
-                    }
-                    slot.Add(new TestEvent(event_name, port, parameters));
-                    output_ports.Add(port);
-                }
-                if (slot.Count > 0)
-                    expected_result.Add(slot);
-            }
-
-            //Prepare model
-            ThreadsControllerBase controller = (ThreadsControllerBase) Activator.CreateInstance(class_type, new object [] {false});
-            IOutputListener output_listener = controller.addOutputListener(output_ports.ToArray());
-
-            //Input
-            XElement input_xml = test_xml.Element("input");
-            if (input_xml != null)
-            {
-                foreach (XElement event_xml in input_xml.Elements("event"))
-                {
-                    controller.addInput(new Event(event_xml.Attribute("name").Value, event_xml.Attribute("port").Value), Convert.ToDouble(event_xml.Attribute("time").Value));
-                }
-            }
-
-            //Execute model
-            controller.start();
-            controller.join();
-
-            //Check output
-            for (int slot_index = 0; slot_index < expected_result.Count; slot_index++)
-            {
-                List<TestEvent> slot = expected_result[slot_index];
-                List<TestEvent> remaining_options = new List<TestEvent>(slot);
-                List<Event> received_output = new List<Event>();
-                while (remaining_options.Count > 0)
-                {
-                    Event output_event = output_listener.fetch();
-                    Assert.AreNotEqual(null, output_event,
-                                       string.Format("Expected results slot {0} mismatch. Expected [{1}], but got [{2}] followed by null instead.", slot_index, string.Join(", ", slot), string.Join(", ", received_output))
-                                       );
-                    received_output.Add(output_event);
-                    int i = 0;
-                    foreach (TestEvent option in remaining_options)
-                    {
-                        if (option.matches(output_event))
-                            break;
-                        i++;
-                    }
-                    //Mismath?
-                    Assert.AreNotEqual(remaining_options.Count,i,
-                                       string.Format("Expected results slot {0} mismatch. Expected [{1}], but got [{2}] instead.", slot_index, string.Join(", ", slot), string.Join(", ", received_output))
-                                       );
-                    remaining_options.RemoveAt(i);
-                }
-            }
-            //check if there are no extra events          
-            Assert.AreEqual(null, output_listener.fetch(), "More output events than expected on selected ports.");
-        }
-
-        [TearDown]
-        public void cleanup()
-        {
-            if (!keep_after_test && File.Exists(this.path_generated_code))
-            {
-                File.Delete(this.path_generated_code);
-            }
-        }
-
-        protected static IEnumerable GetTestCases()
-        {
-            foreach (string file_path in Directory.EnumerateFiles("../../../test_files"))
-            {
-                if (Path.GetExtension(file_path) == ".xml")
-                    yield return new TestCaseData(file_path).SetName(Path.GetFileNameWithoutExtension(file_path));
-            }
-        }
-    }
-}
-

+ 0 - 68
test/csharp_tests/csharp_tests.csproj

@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>10.0.0</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{EA55100B-CE22-4ACD-B132-443A30896D19}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <RootNamespace>csharp_tests</RootNamespace>
-    <AssemblyName>csharp_tests</AssemblyName>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-    <UnitTestInformation>
-      <UnitTestInformation />
-    </UnitTestInformation>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="sccdlib">
-      <HintPath>..\csharp_runtime\bin\Debug\sccdlib.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Core" />
-    <Reference Include="nunit.framework, Version=2.6.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="System.Xml" />
-    <Reference Include="csharp_sccd_compiler">
-      <HintPath>..\csharp_sccd_compiler\bin\Debug\csharp_sccd_compiler.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="CodeCompiler.cs" />
-    <Compile Include="TestEvent.cs" />
-    <Compile Include="TestsBase.cs" />
-    <Compile Include="PythonTests.cs" />
-    <Compile Include="CSharpTests.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties>
-        <Policies>
-          <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
-        </Policies>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
-</Project>

+ 0 - 44
test/csharp_tests/csharp_tests.sln

@@ -1,44 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp_tests", "csharp_tests.csproj", "{EA55100B-CE22-4ACD-B132-443A30896D19}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{EA55100B-CE22-4ACD-B132-443A30896D19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{EA55100B-CE22-4ACD-B132-443A30896D19}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EA55100B-CE22-4ACD-B132-443A30896D19}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{EA55100B-CE22-4ACD-B132-443A30896D19}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(MonoDevelopProperties) = preSolution
-		StartupItem = csharp_tests.csproj
-		Policies = $0
-		$0.TextStylePolicy = $1
-		$1.inheritsSet = VisualStudio
-		$1.inheritsScope = text/plain
-		$1.scope = text/x-csharp
-		$0.CSharpFormattingPolicy = $2
-		$2.IndentSwitchBody = True
-		$2.AnonymousMethodBraceStyle = NextLine
-		$2.PropertyBraceStyle = NextLine
-		$2.PropertyGetBraceStyle = NextLine
-		$2.PropertySetBraceStyle = NextLine
-		$2.EventBraceStyle = NextLine
-		$2.EventAddBraceStyle = NextLine
-		$2.EventRemoveBraceStyle = NextLine
-		$2.StatementBraceStyle = NextLine
-		$2.ArrayInitializerBraceStyle = NextLine
-		$2.BeforeMethodDeclarationParentheses = False
-		$2.BeforeMethodCallParentheses = False
-		$2.BeforeConstructorDeclarationParentheses = False
-		$2.BeforeDelegateDeclarationParentheses = False
-		$2.NewParentheses = False
-		$2.inheritsSet = Mono
-		$2.inheritsScope = text/x-csharp
-		$2.scope = text/x-csharp
-	EndGlobalSection
-EndGlobal

+ 13 - 7
test/run_tests.py

@@ -5,6 +5,8 @@ import unittest
 
 from sccd.runtime.statecharts_core import *
 
+BUILD_DIR = "build"
+
 class PyTestCase(unittest.TestCase):
     def __init__(self, file_name):
         unittest.TestCase.__init__(self)
@@ -71,12 +73,16 @@ class PyTestCase(unittest.TestCase):
 if __name__ == '__main__':
     suite = unittest.TestSuite()
 
-    for d in os.listdir("target_py"):
-        subdir = os.path.join("target_py", d)
-        if not os.path.isdir(subdir):
-            continue
-        for f in os.listdir(subdir):
-            if f.endswith(".py") and not f.startswith("_"):
-                suite.addTest(PyTestCase(os.path.join(subdir, f)))
+    for r, dirs, files in os.walk(BUILD_DIR):
+        for file in files:
+            if file.endswith(".py") and not file.startswith("_"):
+                suite.addTest(PyTestCase(os.path.join(r, file)))
+    # for d in os.listdir("target_py"):
+    #     subdir = os.path.join("target_py", d)
+    #     if not os.path.isdir(subdir):
+    #         continue
+    #     for f in os.listdir(subdir):
+    #         if f.endswith(".py") and not f.startswith("_"):
+    #             suite.addTest(PyTestCase(os.path.join(subdir, f)))
 
     unittest.TextTestRunner(verbosity=2).run(suite)

+ 27 - 0
test/scxml_test_suite/test144.txml

@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that events are inserted into the queue in the order in which they are raised.  If
+foo occurs before bar, success, otherwise failure -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+    <raise event="foo"/>
+    <raise event="bar"/>
+    </onentry>
+  <transition event="foo" target="s1"/>
+  <transition event="*" conf:targetfail=""/>
+   
+ </state>
+
+<state id="s1">
+  <transition event="bar" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/> 
+  </state>
+  
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 34 - 0
test/scxml_test_suite/test147.txml

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+<!-- test that the first clause that evaluates to true - and only that clause - is executed.
+Only one event should be raised, and it should be bar -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:expr="0"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+  <if conf:false="">
+    <raise event="foo"/>
+    <conf:incrementID id="1"/>
+  <elseif conf:true=""/>
+    <raise event="bar"/>
+    <conf:incrementID id="1"/>
+  <else/>
+    <raise event="baz"/>
+   <conf:incrementID id="1"/>
+    </if>
+   <raise event="bat"/>
+    </onentry>
+  <transition event="bar" conf:idVal="1=1" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+   
+ </state>
+
+  
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 35 - 0
test/scxml_test_suite/test148.txml

@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+
+<!-- test that the else clause executes if <if> and <elseif> evaluate to false.
+Baz should be the only event generated by the <if>.  bat is raised to catch the case where the <else> clause
+fails and baz is not generated, i.e. it makes sure that the test doesn't hang.  --> 
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:expr="0"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+  <if conf:false="">
+    <raise event="foo"/>
+    <conf:incrementID id="1"/>
+  <elseif conf:false=""/>
+    <raise event="bar"/>
+    <conf:incrementID id="1"/>
+  <else/>
+    <raise event="baz"/>
+   <conf:incrementID id="1"/>
+    </if>
+   <raise event="bat"/>
+    </onentry>
+  <transition event="baz" conf:idVal="1=1" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+   
+ </state>
+
+  
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 28 - 0
test/scxml_test_suite/test149.txml

@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- test that neither if clause executes, so that bat is the only event raised. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:expr="0"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+  <if conf:false="">
+    <raise event="foo"/>
+    <conf:incrementID id="1"/>
+  <elseif conf:false=""/>
+    <raise event="bar"/>
+    <conf:incrementID id="1"/>
+ </if>
+   <raise event="bat"/>
+    </onentry>
+  <transition event="bat" conf:idVal="1=0" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+  
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 45 - 0
test/scxml_test_suite/test150.txml

@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist.  Also
+test that it will use an existing var if it does exist. -->
+
+<scxml initial="s0" 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"/>
+  <data conf:id="2"/>
+  <data conf:id="3">
+    <conf:array123/>
+    </data>
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+<!-- first use declared variables -->
+        <foreach conf:item="1" conf:index="2" conf:arrayVar="3"/>
+        <raise event="foo"/>
+        </onentry>
+   <transition event="error" conf:targetfail=""/>
+   <transition event="*" target="s1"/> 
+   </state>
+   
+<state id="s1">
+     <onentry>
+<!-- now use undeclared variables -->
+        <foreach conf:item="4" conf:index="5" conf:arrayVar="3"/>
+        <raise event="bar"/>
+        </onentry>
+   <transition event="error" conf:targetfail=""/>
+   <transition event="*" target="s2"/> 
+   </state>
+
+<state id="s2">
+  <!-- check that var4 is bound -->
+  <transition conf:isBound="4" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>  
+   <conf:pass/>
+   <conf:fail/>
+   
+
+
+</scxml>

+ 45 - 0
test/scxml_test_suite/test151.txml

@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach causes a new variable to be declared if 'item' doesn't already exist.  Also
+test that it will use an existing var if it does exist. -->
+
+<scxml initial="s0" 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"/>
+  <data conf:id="2"/>
+  <data conf:id="3">
+    <conf:array123/>
+    </data>
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+<!-- first use declared variables -->
+        <foreach conf:item="1" conf:index="2" conf:arrayVar="3"/>
+        <raise event="foo"/>
+        </onentry>
+   <transition event="error" conf:targetfail=""/>
+   <transition event="*" target="s1"/> 
+   </state>
+   
+<state id="s1">
+     <onentry>
+<!-- now use undeclared variables -->
+        <foreach conf:item="4" conf:index="5" conf:arrayVar="3"/>
+        <raise event="bar"/>
+        </onentry>
+   <transition event="error" conf:targetfail=""/>
+   <transition event="*" target="s2"/> 
+   </state>
+
+<state id="s2">
+  <!-- check that var5 is bound -->
+  <transition conf:isBound="5" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>  
+   <conf:pass/>
+   <conf:fail/>
+   
+
+
+</scxml>

+ 52 - 0
test/scxml_test_suite/test152.txml

@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+
+<!-- test that an illegal array or item value causes error.execution and results in executable content
+not being executed. -->
+
+<scxml initial="s0" 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="0"/>
+  <data conf:id="2"/>
+  <data conf:id="3"/>
+  <data conf:id="4" conf:illegalArray=""/>
+  <data conf:id="5">
+    <conf:array123/>
+    </data>
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+<!-- invalid array, legal item -->
+        <foreach conf:item="2" conf:index="3" conf:arrayTextVar="4">
+          <conf:incrementID id="1"/>
+          </foreach>
+        <raise event="foo"/>
+        </onentry>
+   <transition event="error.execution" target="s1"/>
+   <transition event="*" conf:targetfail=""/> 
+   </state>
+   
+   <state id="s1">
+      <onentry>
+<!-- illegal item, legal array -->
+        <foreach conf:illegalItem="" conf:index="3" conf:arrayVar="5">
+          <conf:incrementID id="1"/>
+          </foreach>
+        <raise event="bar"/>
+        </onentry>
+   <transition event="error.execution" target="s2"/>
+   <transition event="bar" conf:targetfail=""/> 
+   </state>
+
+<state id="s2">
+  <!-- check that var1 has its original value (so executable content never got executed -->
+  <transition conf:idVal="1=0" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state> 
+   
+   <conf:pass/>
+   <conf:fail/>
+   
+
+
+</scxml>

+ 39 - 0
test/scxml_test_suite/test153.txml

@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach goes over the array in the right order.  since the array contains 1 2 3, we compare the current 
+value with the previous value, which is stored in var1. The current value should always be larger.  If
+it ever isn't, set Var4 to 0, indicating failure -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:expr="0"/> <!-- contains the previous value -->
+  <data conf:id="2"/> <!-- the item which will contain the current value -->
+  <data conf:id="3">
+    <conf:array123/>
+    </data>
+  <data conf:id="4" conf:expr="1"/> <!-- 1 if success, 0 if failure -->
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+        <foreach conf:item="2"  conf:arrayVar="3">
+         <if conf:compareIDVal="1&lt;2">
+         <assign conf:location="1" conf:varExpr="2"/>
+         <else/>
+         <!-- values are out of order, record failure -->
+         <assign conf:location="4" conf:expr="0"/>
+         </if>
+          </foreach>
+        </onentry>
+
+  <!-- check that var1 has its original value  -->
+  <transition conf:idVal="4=0" conf:targetfail=""/>
+  <transition conf:targetpass=""/>
+  </state> 
+   
+   <conf:pass/>
+   <conf:fail/>
+   
+
+
+</scxml>

+ 30 - 0
test/scxml_test_suite/test155.txml

@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- test that foreach executes the executable content once for each item in the list '(1,2,3)'. The executable
+content sums the items into var1 so it should be 6 at the end -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+  <data conf:id="1" conf:expr="0"/>
+  <data conf:id="2"/>
+  <data conf:id="3">
+    <conf:array123/>
+    </data>
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+        <foreach conf:item="2"  conf:arrayVar="3">
+          <conf:sumVars id1="1" id2="2"/>
+          </foreach>
+        </onentry>
+
+  <transition conf:idVal="1=6" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state> 
+   
+   <conf:pass/>
+   <conf:fail/>
+   
+</scxml>

+ 32 - 0
test/scxml_test_suite/test156.txml

@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!-- test that an error causes the foreach to stop execution.  The second piece of executable content
+should cause an error, so var1 should be incremented only once -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+  <data conf:id="1" conf:expr="0"/>
+  <data conf:id="2"/>
+  <data conf:id="3">
+  <conf:array123/>
+  </data>
+  </datamodel>
+  
+   <state id="s0">
+      <onentry>
+        <foreach conf:item="2"  conf:arrayVar="3">
+          <conf:incrementID id="1"/>
+          <!-- assign an illegal value to a non-existent var -->
+          <assign conf:location="5" conf:illegalExpr=""/>
+          </foreach>
+        </onentry>
+
+  <transition conf:idVal="1=1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state> 
+   
+   <conf:pass/>
+   <conf:fail/>
+   
+</scxml>

+ 27 - 0
test/scxml_test_suite/test158.txml

@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+
+<!-- test that executable content executes in document order.  if event1 occurs then event2, succeed, otherwise fail -->
+
+<scxml initial="s0" 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="0"/>
+  </datamodel>
+  
+  <state id="s0">
+    <onentry>
+      <raise event="event1"/>
+      <raise event="event2"/>
+    </onentry>
+    <transition event="event1"  target="s1"/>
+    <transition event="*" conf:targetfail=""/>
+  </state>
+  
+  <state id="s1">
+    <transition event="event2"  conf:targetpass=""/>
+    <transition event="*" conf:targetfail=""/>
+  </state>
+
+  <conf:pass/>
+  <conf:fail/>
+
+</scxml>

+ 24 - 0
test/scxml_test_suite/test159.txml

@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+
+<!-- test that any error raised by an element of executable content causes all subsequent elements to be skipped.
+The send tag will raise an error so var1 should not be incremented.  If it is fail, otherwise succeed -->
+
+<scxml initial="s0" 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="0"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <send event="thisWillFail" conf:illegalTarget=""/>
+   <conf:incrementID id="1"/>
+    </onentry>
+  <transition conf:idVal="1=1"  conf:targetfail=""/>
+  <transition conf:targetpass=""/>
+ </state>
+
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 23 - 0
test/scxml_test_suite/test172.txml

@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- we test that eventexpr uses the current value of var1, not its initial value  -->
+
+<scxml initial="s0" 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:quoteExpr="event1"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:quoteExpr="event2"/>
+   <send conf:eventExpr="1"/>
+    </onentry>
+    
+  <transition event="event2"  conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 24 - 0
test/scxml_test_suite/test173.txml

@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that targetexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error.  If it uses the current value, event1 will be raised  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:invalidSessionID=""/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:quoteExpr="#_internal"/>
+   <send conf:targetExpr="1" event="event1"/>
+    </onentry>
+    
+  <transition event="event1"  conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 24 - 0
test/scxml_test_suite/test174.txml

@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that typeexpr uses the current value of var1, not its initial value
+(If it uses the initial value, it will generate an error.  If it uses the current value, event1 will be raised  -->
+
+<scxml initial="s0" 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:invalidSendTypeExpr=""/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:quoteExpr="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+   <send conf:typeExpr="1" event="event1"/>
+    </onentry>
+    
+  <transition event="event1"  conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 30 - 0
test/scxml_test_suite/test175.txml

@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!-- we test that delayexpr uses the current value of var1, not its initial value
+(If it uses the initial value, event2 will be generated first, before event1.  If it uses the current value, 
+event1 will be raised first.  Succeed if event1 occurs before event2, otherwise fail -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:quoteExpr="0s"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:quoteExpr="1s"/>
+   <send conf:delayFromVar="1" event="event2"/>
+   <send conf:delay=".5" event="event1"/>
+    </onentry>
+    
+  <transition event="event1"  target="s1"/>
+  <transition event="event2" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+  <transition event="event2"  conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+  </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 33 - 0
test/scxml_test_suite/test176.txml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that <param> uses the current value of var1, not its initial value.  If the value of
+aParam in event1 is 2 so that var2 gets set to 2, success, otherwise failure  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  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"/>
+  <data conf:id="2"/>
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:expr="2"/>
+   <send event="event1">
+     <param name="aParam" conf:varExpr="1"/>
+     </send>
+    </onentry>
+    
+  <transition event="event1"  target="s1">
+  <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+  </transition>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+  <transition conf:idVal="2=2" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>
+     
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 31 - 0
test/scxml_test_suite/test178.txml

@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!-- we test that multiple key/value pairs are included, even when the keys are the same.
+This is a manual test.  The tester must look at the log output and verify that both
+keys are there.  (This test uses the SCXML Event I/O processor, which is the only
+one that all platforms must support.  It does not specify the message format, so 
+we cannot test _event.raw directly.  Therefore we print it out for visual 
+inspection.) -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+  
+<state id="s0">
+  <onentry>
+   <send  event="event1">
+    <param conf:name="1" conf:expr="2"/>
+    <param conf:name="1" conf:expr="3"/>
+    </send>
+     </onentry>
+
+  <transition event="event1" target="final">
+   <log label="_event " conf:eventRaw=""/>
+   </transition>
+  <transition event="*" conf:targetfail=""/>
+ 
+ </state>
+
+
+<final id="final"/>
+<conf:fail/>
+
+</scxml>

+ 21 - 0
test/scxml_test_suite/test179.txml

@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!-- we test that <content> can be used to populate body of a message -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+   <send event="event1">
+   <content>123</content>
+   </send>
+    </onentry>
+    
+  <transition event="event1" conf:eventdataVal="123" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 24 - 0
test/scxml_test_suite/test183.txml

@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- we test that <send> stores the value of the sendid in idlocation.  If it does,
+var1 has a value and we pass.  Otherwise we fail  -->
+
+<scxml initial="s0" 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"/>
+
+  </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <send event="event1" conf:idlocation="1"/>
+    </onentry>
+    
+  <transition conf:isBound="1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+ </state>
+
+     
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 26 - 0
test/scxml_test_suite/test185.txml

@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that <send> respects the delay specification.  If it does, event1 arrives before event2
+ and we pass.  Otherwise we fail  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+   <send event="event2" conf:delay="1"/>
+   <send event="event1"/>
+    </onentry>
+    
+  <transition event="event1" target="s1"/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+  <transition event="event2" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+  </state>
+       
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 34 - 0
test/scxml_test_suite/test186.txml

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- we test that <send> evals its args when it is evaluated, not when the delay interval expires and the
+message is actually sent.  If it does, aParam will have the value of 1 (even though var1 has been incremented
+in the interval.)  If var2 ends up == 1, we pass.  Otherwise we fail  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  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"/>
+ <data conf:id="2"/>
+ </datamodel>
+  
+<state id="s0">
+  <onentry>
+   <send event="event1" conf:delay="1">
+     <param name="aParam" conf:varExpr="1"/>
+     </send>
+   <assign conf:location="1" conf:expr="2"/>
+    </onentry>
+    
+  <transition event="event1" target="s1">
+    <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+    </transition>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+  <transition conf:idVal="2=1"  conf:targetpass=""/>
+  <transition  conf:targetfail=""/>
+  </state>
+       
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 36 - 0
test/scxml_test_suite/test187.txml

@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- we test that delayed <send> is not sent if the sending session terminates.  In this case,
+a subscript is invoked which sends the event childToParent delayed by 1 second, and then terminates.  The
+parent session, should not receive childToParent. If it does, we fail.  Otherwise the 
+10 sec timer expires and we pass -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+  <state id="s0" >
+    <onentry>
+      <send event="timeout" conf:delay="1"/>
+    </onentry>
+    <invoke type="scxml" >
+      <content>
+        <!-- exit before the delayed send can execute -->
+        <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+          <state id="sub0">
+            <onentry>
+              <send event="childToParent" target="#_parent" conf:delay=".5"/>
+            </onentry>
+            <transition  target="subFinal"/>
+          </state>
+          <final id="subFinal"/>
+        </scxml>
+      </content>
+    </invoke>
+
+    <transition event="childToParent" conf:targetfail=""/>
+    <transition event="timeout" conf:targetpass=""/>
+  </state>
+
+  <conf:pass/>
+  <conf:fail/>
+
+</scxml>

+ 25 - 0
test/scxml_test_suite/test189.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that #_internal as a target of <send> puts the event on the internal queue.  If it does,
+event1 will be processed before event2, because event1 is added to the internal queue while event2 is
+added to the external queue (event though event2 is generated first)  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+   <!-- goes to the external queue -->
+   <send event="event2"/>
+   <!-- to the internal queue -->
+   <send event="event1" target="#_internal"/>
+    </onentry>
+ 
+ <!-- once we've entered the state, we should check for internal events first -->   
+  <transition event="event1" conf:targetpass=""/>
+  <transition event="event2" conf:targetfail=""/>
+ </state>
+
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 38 - 0
test/scxml_test_suite/test190.txml

@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- we test that #_scxml_sessionid as a target of <send> puts the event on the external queue.  If it does,
+event1 will be processed before event2, because event1 is added to the internal queue while event2 is
+added to the external queue (event though event2 is generated first).  we have to make sure that event2
+is actually delivered.  The delayed <send> makes sure another event is generated (so the test doesn't hang) -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1" conf:quoteExpr="#_scxml_"/>
+ <data conf:id="2" conf:systemVarExpr="_sessionid"/>
+ </datamodel>
+  
+<state id="s0">
+  <onentry>
+  <conf:concatVars id1="1" id2="2"/>
+   <!-- goes to the external queue -->
+   <send event="event2" conf:targetExpr="1"/>
+   <!-- to the internal queue -->
+   <raise event="event1"/>
+   <!-- this should get added to the external queue after event2 -->
+   <send event="timeout"/>
+    </onentry>
+ 
+ <!-- once we've entered the state, we should check for internal events first -->   
+  <transition event="event1" target="s1"/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+<!-- now check that we get event2 and not a timeout -->
+<state id="s1">
+  <transition event="event2" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+  </state>
+
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 34 - 0
test/scxml_test_suite/test191.txml

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- we test that #_parent works as  a target of  <send> .  a subscript is invoked and sends the event 
+childToParent to its parent session (ths session) using #_parent as the target. If we get this event, we
+pass, otherwise we fail.  The timer insures that some event is generated and that the test does not hang. -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+  <state id="s0" >
+    <onentry>
+      <send event="timeout" delay="5s"/>
+    </onentry>
+    <invoke type="scxml" >
+      <content>
+        <!-- send an event to the parent session using #_parent as the target -->
+        <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+          <state id="sub0">
+            <onentry>
+              <send event="childToParent" target="#_parent"/>
+            </onentry>
+            <transition  target="subFinal"/>
+          </state>
+          <final id="subFinal"/>
+        </scxml> 
+      </content>
+    </invoke>
+    <transition event="childToParent" conf:targetpass=""/>
+    <transition event="*" conf:targetfail=""/>
+  </state>
+
+  <conf:pass/>
+  <conf:fail/>
+
+</scxml>

+ 58 - 0
test/scxml_test_suite/test192.txml

@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!-- we test that #_invokeid works as  a target of  <send> .  A child  script is invoked and sends us
+childToParent once its running.  Then we send it the event parentToChild using its invokeid as the target.  
+If it receives this event, it sends sends the event eventReceived to its parent session (ths session). 
+If we get this event, we pass, otherwise the child script eventually times out sends invoke.done and we fail.
+We also set a timeout in this process to make sure the test doesn't hang  -->
+
+<scxml initial="s0" conf:datamodel=""  version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+  
+<state id="s0" initial="s01" >
+  <onentry>
+   <send event="timeout" delay="5s"/>
+   </onentry>
+   
+  <invoke type="scxml" id="invokedChild">
+    <content>
+    <!-- let the parent session know we're running by sending childToParent, then wait for parentToChild.
+       If we get it, send eventReceived.  If we don't we eventually time out -->
+          <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ 
+         <state id="sub0">
+            <onentry>
+           <send event="childToParent" target="#_parent"/>
+            <send event="timeout" delay="3s"/>
+          </onentry>
+    
+        <transition event="parentToChild" target="subFinal">
+          <send target="#_parent" event="eventReceived"/>
+         </transition>
+    
+          <transition event="timeout" target="subFinal"/>
+         </state>
+
+        <final id="subFinal"/>
+
+         </scxml>
+      </content>
+     </invoke>
+     
+  <transition event="timeout" conf:targetfail=""/> 
+  <transition event="done.invoke" conf:targetfail=""/>
+  
+<state id="s01">
+    <transition event="childToParent" target="s02">
+         <send target="#_invokedChild" event="parentToChild"/>
+     </transition>
+</state>
+
+<state id="s02">
+  <transition event="eventReceived" conf:targetpass=""/>
+  </state>
+
+</state>
+
+   <conf:pass/>
+   <conf:fail/>
+
+</scxml>

+ 29 - 0
test/scxml_test_suite/test193.txml

@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- we test that omitting target and targetexpr of <send> when using the
+SCXML event i/o processor puts the event on the external queue.  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+  	  <send event="internal"/>
+   <!-- this should put event1 in the external queue -->
+   <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+   <send event="timeout" delay="1s"/>
+    </onentry>
+  
+  <transition event="event1" conf:targetfail=""/>
+  <transition event="internal" target="s1"/>
+ </state>
+ 
+ <state id="s1">
+ 	<transition event="event1" conf:targetpass=""/>
+ 	<transition event="timeout" conf:targetfail=""/>
+ 	
+ 	</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 26 - 0
test/scxml_test_suite/test194.txml

@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that specifying an illegal target for <send> causes the event error.execution to be raised.  If it does,
+we succeed.  Otherwise we eventually timeout and fail.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+  
+<state id="s0">
+  <onentry>
+   <!-- should cause an error -->
+   <send conf:illegalTarget="" event="event2"/>
+   <!-- this will get added to the external event queue after the error has been raised -->
+   <send event="timeout"/>
+    </onentry>
+ 
+ <!-- once we've entered the state, we should check for internal events first -->   
+  <transition event="error.execution" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 23 - 0
test/scxml_test_suite/test198.txml

@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- we test that if type is not provided <send> uses the scxml event i/o processor.  The only way to tell
+what processor was used is to look at the origintype of the resulting event  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+  <onentry>
+   <send  event="event1"/>
+   <send event="timeout"/>
+    </onentry>
+
+  
+  <transition event="event1" conf:originTypeEq="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 22 - 0
test/scxml_test_suite/test199.txml

@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- we test that using an invalid send type results in error.execution -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+  <onentry>
+   <send conf:invalidSendType="" event="event1"/>
+   <send event="timeout"/>
+    </onentry>
+ 
+ 
+  <transition event="error.execution" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 22 - 0
test/scxml_test_suite/test200.txml

@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- we test that the processor supports the scxml event i/o processor -->
+
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+  <onentry>
+   <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event1"/>
+   <send event="timeout"/>
+    </onentry>
+ 
+ 
+  <transition event="event1" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 25 - 0
test/scxml_test_suite/test201.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that the processor supports the basic http event i/o processor.  This is an optional
+test since platforms are not required to support basic http event i/o -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<state id="s0">
+  <onentry>
+   <send type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor" 
+   	conf:basicHTTPAccessURITarget=""
+   	event="event1"/>
+   <send event="timeout"/>
+    </onentry>
+ 
+ 
+  <transition event="event1" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 34 - 0
test/scxml_test_suite/test205.txml

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!-- we test that the processor doesn't  change the message.  We can't test that it never does this, but
+at least we can check that the event name and included data are the same as we sent.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+   <data conf:id="1"/>
+   </datamodel>
+   
+<state id="s0">
+  <onentry>
+   <send  event="event1">
+     <param name="aParam" conf:expr="1"/>
+     </send>
+   <send event="timeout"/>
+    </onentry>
+ 
+ 
+  <transition event="event1" target="s1">
+     <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+     </transition>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+  <transition conf:idVal="1=1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state> 
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 60 - 0
test/scxml_test_suite/test207.txml

@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<!-- we test that that we can't  cancel an event in another session.  We invoke a child process.  It notifies
+us when it has generated a delayed event with sendid foo.  We try to cancel foo.  The child  process sends us event
+ event success if the event is not cancelled, event fail otherwise.  This doesn't test that there is absolutely no way to cancel an event
+raised in another session, but the spec doesn't define any way to refer to an event in another process  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+   
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" conf:delay="2"/>
+    </onentry>
+  <invoke type="scxml">
+    <content>
+    <!-- when invoked, we raise a delayed event1 with sendid 'foo' and notify our parent.  Then we wait.
+      If event1 occurs, the parent hasn't succeeded in canceling it and we return pass.  If event2 occurs
+      it means event1 was canceled (because event2 is delayed longer than event1) and we return 'fail'.  -->
+
+
+         <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <state id="sub0">
+            <onentry>
+             <send event="event1" id="foo" conf:delay="1"/>
+              <send event="event2" conf:delay="1.5"/>
+              <send target="#_parent" event="childToParent"/>
+              </onentry>
+ 
+               <transition event="event1" target="subFinal">
+                   <send target="#_parent" event="pass"/>
+                   </transition>
+               <transition event="*" target="subFinal">
+                      <send target="#_parent" event="fail"/>
+              </transition>
+ 
+               </state>
+            <final id="subFinal"/>
+           </scxml>
+    </content>
+    </invoke>
+  
+  <state id="s01">
+    <transition event="childToParent" target="s02">
+      <cancel sendid="foo"/>
+      </transition>
+   </state>
+   
+ <state id="s02">
+  <transition event="pass" conf:targetpass=""/>
+  <transition event="fail" conf:targetfail=""/>
+  <transition event="timeout" conf:targetfail=""/>
+ </state>
+ 
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 25 - 0
test/scxml_test_suite/test208.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that cancel works.  We cancel delayed event1.  If cancel works, we get event2 first and pass.  If
+we get event1 or an error first, cancel didn't work and we fail.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+   
+<state id="s0">
+  <onentry>
+   <send  id="foo" event="event1" conf:delay="1"/>
+   <send event="event2" conf:delay="1.5"/>
+   <cancel sendid="foo"/>
+    </onentry>
+
+  <transition event="event2" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ 
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 28 - 0
test/scxml_test_suite/test210.txml

@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!-- we test that sendidexpr works with cancel.  If it takes the most recent value of var1, it should cancel 
+delayed event1.  Thus we get event2 first and pass.  If we get event1 or an error first, cancel didn't work and we fail.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1" conf:quoteExpr="bar"/>
+  </datamodel>
+   
+<state id="s0">
+  <onentry>
+   <send  id="foo" event="event1" conf:delay="1"/>
+   <send event="event2" conf:delay="1.5"/>
+   <assign conf:location="1" conf:quoteExpr="foo"/>
+   <cancel conf:sendIDExpr="1"/>
+    </onentry>
+
+  <transition event="event2" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+ 
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 33 - 0
test/scxml_test_suite/test215.txml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that typexpr is evaluated at runtime.  If the original value of var1 is used, the invocation
+will fail (test215sub1.scxml is not of type 'foo', even if the platform supports foo as a type).  If
+the runtime value is used, the invocation will succeed -->
+
+
+<scxml initial="s0" 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:quoteExpr="foo"/>
+   </datamodel> 
+   
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="5s"/>
+    <assign conf:location="1" conf:quoteExpr="http://www.w3.org/TR/scxml/"/>
+    </onentry>
+  <invoke conf:typeExpr="1">
+    <content>
+        <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded.   -->
+        <scxml initial="subFinal" conf:datamodel=""  version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+      <final id="subFinal"/>
+        </scxml>
+    </content>
+    </invoke>
+  <transition event="done.invoke" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/> 
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 26 - 0
test/scxml_test_suite/test216.txml

@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- we test that srcexpr is evaluated at runtime.  If the original value of var1 is used, the invocation
+will fail (assuming that there is no script named 'foo').  If
+the runtime value is used, the invocation will succeed -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<datamodel>
+  <data conf:id="1" conf:quoteExpr="foo"/>
+   </datamodel> 
+   
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="5s"/>
+   <assign conf:location="1" conf:quoteExpr="file:test216sub1.scxml"/>
+    </onentry>
+  <invoke conf:srcExpr="1" type="http://www.w3.org/TR/scxml"/>
+  <transition event="done.invoke" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/> 
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 25 - 0
test/scxml_test_suite/test220.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- we test that the scxml type is supported.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+   
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="5s"/>
+    </onentry>
+     <invoke type="http://www.w3.org/TR/scxml/">
+     <content>
+       <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded.   -->
+         <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <final id="subFinal"/>
+          </scxml></content>
+     </invoke>
+  <transition event="done.invoke" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/> 
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 33 - 0
test/scxml_test_suite/test223.txml

@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!-- we test that idlocation is supported.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+   <data conf:id="1"/>
+   </datamodel>
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="1s"/>
+    </onentry>
+     <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+     <content>
+     <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded.   -->
+       <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+       <final id="subFinal"/>
+        </scxml>
+       </content>
+    </invoke>
+  <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+  <transition conf:isBound="1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 35 - 0
test/scxml_test_suite/test224.txml

@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!-- we test that the automatically generated id has the form stateid.platformid.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+   <data conf:id="1"/>
+   <data conf:id="2" conf:quoteExpr="s0."/>
+   </datamodel>
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="1s"/>
+    </onentry>
+ <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+    <content> 
+    <!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded.   -->
+      <scxml version="1.0" initial="subFinal" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+      <final id="subFinal"/>
+      </scxml>
+     </content>
+    </invoke>
+
+  <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+  <transition conf:varPrefix="2 1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 42 - 0
test/scxml_test_suite/test225.txml

@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!-- we test that the automatically generated id is unique, we call invoke twice and compare the ids.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+   <data conf:id="1"/>
+   <data conf:id="2"/>
+   </datamodel>
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="1s"/>
+    </onentry>
+
+   <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="1">
+      <content>
+      <scxml initial="subFinal1" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+         <final id="subFinal1"/>
+        </scxml>
+     </content>
+     </invoke>
+   <invoke type="http://www.w3.org/TR/scxml/" conf:idlocation="2" >
+      <content>
+      <scxml initial="subFinal2" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+         <final id="subFinal2"/>
+        </scxml>
+     </content>
+     </invoke>
+
+  <transition event="*" target="s1"/>
+</state>
+
+<state id="s1">
+  <transition conf:VarEqVar="1 2" conf:targetfail=""/>
+  <transition conf:targetpass=""/>
+  </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 27 - 0
test/scxml_test_suite/test226.txml

@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- this is basically just a test that invoke works correctly and that you can pass data
+to the invoked process.  If the invoked session finds aParam==1, it exits, signalling
+success.  otherwise it will hang and the timeout in this doc signifies failure.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>
+
+ 
+   <invoke type="http://www.w3.org/TR/scxml/" src="file:test226sub1.scxml">
+      <param conf:name="1" conf:expr="1"/>
+      </invoke>
+
+  <transition event="varBound" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 37 - 0
test/scxml_test_suite/test228.txml

@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!-- test that the invokeid is included in events returned from the invoked process.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+   <data conf:id="1"/>
+   </datamodel>
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>
+ 
+  <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+   <content>
+     <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+      <final id="subFinal"/>
+       </scxml>
+    </content>
+    </invoke>
+
+  <transition event="done.invoke" target="s1">
+    <assign conf:location="1" conf:eventField="invokeid"/>
+    </transition>
+  <transition event="*" conf:targetfail=""/>
+</state>
+
+<state id="s1">
+  <transition conf:idQuoteVal="1=foo" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 46 - 0
test/scxml_test_suite/test229.txml

@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- test that autofoward works. If the child  process receives back a copy of the
+childToParent event that it sends to this doc, it sends eventReceived, signalling success. (Note
+that this doc is not required to process that event explicitly.  It should be forwarded in any case.) Otherwise
+it eventually times out and the done.invoke signals failure   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>
+ 
+  <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+    <content>
+      <!-- when invoked, send childToParent to parent.  
+      If it is forwarded back to us, send
+      eventReceived to signal success and terminate.  
+      Otherwise wait for timer to expire and terminate.  -->
+     <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+        <state id="sub0">
+          <onentry>
+             <send target="#_parent" event="childToParent"/> 
+              <send event="timeout" delay="3s"/> 
+            </onentry> 
+         <transition event="childToParent" target="subFinal">
+         <send target="#_parent" event="eventReceived"/>
+          </transition>
+           <transition event="*" target="subFinal"/>
+       </state>
+        <final id="subFinal"/>
+        </scxml>
+    </content>
+    </invoke>
+
+  <transition event="childToParent"/>
+  <transition event="eventReceived" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 66 - 0
test/scxml_test_suite/test230.txml

@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!-- a manual test that an autofowarded event has the same fields and values as the original event.
+the child process sends the parent process an event which is forwarded back to it.  
+Both the parent and child process print out the contents of the event. The tester 
+must check if they are the same and report his result.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>
+  <invoke type="http://www.w3.org/TR/scxml/" autoforward="true">
+    <content>
+    <!-- when invoked, send childToParent to parent.  If it is forwarded back to us, print out its
+        fields and terminate.  -->
+        <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <state id="sub0">
+            <onentry>
+              <send target="#_parent" event="childToParent"/> 
+              <send event="timeout" delay="2s"/>
+             </onentry> 
+           <transition event="childToParent" target="subFinal">
+                  <log label="name is " conf:eventField="name" />
+                  <log label="type is " conf:eventField="type" />
+                  <log label="sendid is "  conf:eventField="sendid"/>
+                 <log  label="origin is "  conf:eventField="origin" />
+                 <log label="origintype is "  conf:eventField="origintype" />
+                 <log label="invokeid is " conf:eventField="invokeid" />
+                 <log label="data is "  conf:eventField="data"/>
+              </transition>
+          <transition event="*" target="subFinal"/>  
+          </state>
+        <final id="subFinal"/>
+       </scxml>
+       </content>
+       </invoke>
+  <transition event="timeout" target="final"/>
+   
+ 
+  <state id="s01">
+  <transition event="childToParent" target="s02">
+    <log label="name is " conf:eventField="name" />
+    <log label="type is " conf:eventField="type" />
+    <log label="sendid is "  conf:eventField="sendid"/>
+    <log  label="origin is "  conf:eventField="origin" />
+    <log label="origintype is "  conf:eventField="origintype" />
+    <log label="invokeid is " conf:eventField="invokeid" />
+    <log label="data is "  conf:eventField="data"/>
+    </transition>
+  <transition event="*" conf:targetfail=""/>
+ </state>
+ 
+ <state id="s02">
+  <!-- wait till we get the done event to ensure that the child process has time to print out its results -->
+   <transition event="done.invoke" target="final"/>
+   </state>
+
+</state>
+
+<final id="final"/>
+<conf:fail/>
+
+</scxml>

+ 44 - 0
test/scxml_test_suite/test232.txml

@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!-- test that a parent process can receive multiple events from a child process   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>
+  <invoke type="http://www.w3.org/TR/scxml/">
+    <content>
+    <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+      <final id="subFinal">
+           <onentry>
+             <send target="#_parent" event="childToParent1"/> 
+               <send target="#_parent" event="childToParent2"/>
+             </onentry> 
+       </final>
+         </scxml>
+    </content>
+    </invoke>
+  <transition event="timeout" conf:targetfail=""/>
+   
+ 
+  <state id="s01">
+  <transition event="childToParent1" target="s02"/>
+ </state>
+ 
+ <state id="s02">
+   <transition event="childToParent2" target="s03"/>
+   </state>
+   
+<state id="s03">
+  <transition event="done.invoke" conf:targetpass=""/>
+  </state>   
+
+</state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml>

+ 39 - 0
test/scxml_test_suite/test233.txml

@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!-- test that finalize markup runs before the event is processed.  The invoked process will
+return 2 in _event.data.aParam, so that new value should be in force when we select
+the transtitions.   -->
+
+
+<scxml initial="s0" version="1.0"  conf:datamodel=""  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 event="timeout" delay="3s"/>
+    </onentry>
+    <invoke type="http://www.w3.org/TR/scxml/">
+      <content>
+        <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+          <final id="subFinal">
+            <onentry>
+              <send target="#_parent" event="childToParent">
+                <param name="aParam" conf:expr="2"/>
+              </send> 
+            </onentry> 
+          </final>
+        </scxml>
+      </content>
+      <finalize>
+        <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+      </finalize>
+    </invoke>
+
+    <transition event="childToParent" conf:idVal="1=2" conf:targetpass=""/>
+    <transition event="*" conf:targetfail=""/>
+  </state>   
+
+  <conf:pass/>
+  <conf:fail/>
+</scxml>

+ 70 - 0
test/scxml_test_suite/test234.txml

@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!-- test that only finalize markup in the invoking state runs.  the first invoked process will
+return 2 in _event.data.aParam, while second invoked process sleeps without returning any events. 
+Only the first finalize should execute.  So when we get to s1 var1 should have value 2 but 
+var2 should still be set to 1  -->
+
+
+<scxml initial="p0" version="1.0" conf:datamodel=""  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"/>
+  <data conf:id="2" conf:expr="1"/>
+  </datamodel>
+<parallel id="p0">
+    <onentry>
+    <send event="timeout" delay="3s"/>
+    </onentry>   
+    <transition event="timeout" conf:targetfail=""/>  
+    
+   <state id="p01">
+    <invoke type="http://www.w3.org/TR/scxml/">
+       <content>
+       <scxml version="1.0" initial="subFinal1" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+          <final id="subFinal1">
+           <onentry>
+            <send target="#_parent" event="childToParent">
+            <param name="aParam" conf:expr="2"/>
+          </send> 
+         </onentry> 
+          </final>
+            </scxml>
+         </content>
+      <finalize>
+        <assign conf:location="1" conf:eventDataFieldValue="aParam"/>
+        </finalize>
+        </invoke>
+      
+      <transition event="childToParent" conf:idVal="1=2" target="s1"/>
+       <transition event="childToParent" conf:targetfail=""/>
+    </state> 
+
+   <state id="p02">
+     <invoke type="http://www.w3.org/TR/scxml/">
+       <content>
+       <scxml version="1.0" initial="sub0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+         <state id="sub0">
+           <onentry>
+              <send event="timeout" delay="2s"/>
+            </onentry>
+             <transition event="timeout" target="subFinal2"/>
+             </state>
+              <final id="subFinal2"/>
+              </scxml>
+        </content>
+      <finalize>
+        <assign conf:location="2" conf:eventDataFieldValue="aParam"/>
+         </finalize>
+      </invoke>
+  </state>
+
+</parallel>    
+
+  
+<state id="s1">
+  <transition conf:idVal="2=1" conf:targetpass=""/>
+  <transition conf:targetfail=""/>
+  </state>
+  
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 27 - 0
test/scxml_test_suite/test235.txml

@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!-- test that done.invoke.id event has the right id.  the invoked child terminates immediately
+and should generate done.invoke.foo   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+  <invoke type="http://www.w3.org/TR/scxml/" id="foo">
+    <content>
+      <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+        <final id="subFinal"/>
+        </scxml>
+        </content>
+        </invoke>
+      
+  <transition event="done.invoke.foo" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+</state>   
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 43 - 0
test/scxml_test_suite/test236.txml

@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- test that done.invoke.id event is the last event we receive.  the invoked process sends childToParent
+in the exit handler of its final state.  We should get it before the done.invoke, and we should get no
+events after the done.invoke.  Hence timeout indicates success   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout" conf:delay="2"/>
+    </onentry>
+  <invoke type="http://www.w3.org/TR/scxml/">
+    <content>
+      <scxml initial="subFinal" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+       <final id="subFinal">
+          <onexit>
+           <send target="#_parent" event="childToParent"/>
+            </onexit>
+           </final>
+         </scxml>
+      </content>
+      </invoke>
+ 
+  <transition event="childToParent" target="s1"/>    
+  <transition event="done.invoke" conf:targetfail=""/>
+</state>
+
+<state id="s1">
+  <!-- here we should get done.invoke -->
+  <transition event="done.invoke" target="s2"/>
+  <transition event="*" conf:targetfail=""/>
+  </state>
+  
+<state id="s2">
+  <transition event="timeout" conf:targetpass=""/>
+  <transition event="*" conf:targetfail=""/>
+  </state>   
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 45 - 0
test/scxml_test_suite/test237.txml

@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!-- test that cancelling works. invoked child sleeps for two seconds, then terminates.  We
+sleep for 1 sec in s0, then move to s1.  This should cause the invocation to get cancelled.
+If we receive done.invoke, the invocation wasn't cancelled, and we fail. If we receive no events by
+the time timeout2 fires, success   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout1" conf:delay="1"/>
+    </onentry>
+  <invoke type="http://www.w3.org/TR/scxml/">
+    <content>
+      <!-- when invoked, sleep for 2 secs then terminate.  Parent will try to cancel this session -->
+         <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <state id="sub0">
+            <onentry>
+              <send event="timeout" conf:delay="2"/>
+                </onentry>
+               <transition event="timeout" target="subFinal"/>
+                </state>   
+            <final id="subFinal"/>
+         </scxml>
+         </content>
+          </invoke>
+ 
+  <transition event="timeout1" target="s1"/>    
+
+</state>
+
+<state id="s1">
+    <onentry>
+    <send event="timeout2" conf:delay="1.5"/>
+    </onentry>
+  <!-- here we should NOT get done.invoke -->
+  <transition event="done.invoke" conf:targetfail=""/>
+  <transition event="*" conf:targetpass=""/>
+  </state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 36 - 0
test/scxml_test_suite/test239.txml

@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!-- test that markup can be specified both by 'src' and by <content>  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+    <transition event="timeout" conf:targetfail=""/>
+    
+   <state id="s01">
+     <invoke type="http://www.w3.org/TR/scxml/"  src="file:test239sub1.scxml"/>
+     <transition event="done.invoke" target="s02"/>
+   </state>
+
+<state id="s02">
+      <invoke type="http://www.w3.org/TR/scxml/">
+        <!-- identical to test239sub1.scxml.  -->
+          <content>
+            <scxml version="1.0" initial="final" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <final id="final"/>
+              </scxml>
+            </content>
+        </invoke>
+ 
+  <transition event="done.invoke" conf:targetpass=""/>
+  </state>
+  
+</state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 71 - 0
test/scxml_test_suite/test240.txml

@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified both by 'namelist' and by <param>.
+invoked child will return success if its Var1 is set to 1, failure otherwise. This
+test will fail schema validation because of the multiple occurences of Var1, but
+should run correctly. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  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" initial="s01">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+    <transition event="timeout" conf:targetfail=""/>
+   
+   <state id="s01">
+     <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+       <content>
+         <scxml initial="sub01" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <datamodel>
+             <data conf:id="1" conf:expr="0"/>
+               </datamodel>
+                   <state id="sub01">
+                      <transition conf:namelistIdVal="1=1" target="subFinal1">
+                     <send target="#_parent" event="success"/>
+                     </transition>
+                  <transition  target="subFinal1">
+                 <send target="#_parent" event="failure"/>
+                 </transition>
+               </state>
+         <final id="subFinal1"/>
+          </scxml>
+        </content>
+        </invoke>
+     <transition event="success" target="s02"/>
+     <transition event="failure" conf:targetfail=""/>
+   </state>
+
+<state id="s02">
+      <invoke type="http://www.w3.org/TR/scxml/">
+          <param conf:name="1" conf:expr="1"/>
+       <content>
+         <scxml initial="sub02" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <datamodel>
+             <data conf:id="1" conf:expr="0"/>
+               </datamodel>
+   
+                  <state id="sub02">
+                      <transition conf:idVal="1=1" target="subFinal2">
+                     <send target="#_parent" event="success"/>
+                     </transition>
+                  <transition  target="subFinal2">
+                 <send target="#_parent" event="failure"/>
+                 </transition>
+               </state>
+         <final id="subFinal2"/>
+          </scxml>
+        </content>
+        </invoke>
+     <transition event="success" conf:targetpass=""/>
+     <transition event="failure" conf:targetfail=""/>
+  </state>
+ 
+</state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 102 - 0
test/scxml_test_suite/test241.txml

@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!-- The child process will return success ifits Var1 is set to 1, failure otherwise. For this test
+we try passing in Var1 by param and by namelist and check that we either get two successes
+or two failures.  This test will fail schema validation due to multiple  declarations of
+Var1, but should  run correctly.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  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" initial="s01">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+    <transition event="timeout" conf:targetfail=""/>
+   
+   <state id="s01">
+     <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+              <content>
+            <scxml initial="sub01" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <datamodel>
+               <data conf:id="1" conf:expr="0"/>
+                </datamodel>
+   
+           <state id="sub01">
+              <transition conf:idVal="1=1" target="subFinal1">
+                  <send target="#_parent" event="success"/>
+                    </transition>
+              <transition  target="subFinal1">
+                    <send target="#_parent" event="failure"/>
+                </transition>
+              </state>
+     
+            <final id="subFinal1"/>
+            </scxml>
+       </content>
+       </invoke>
+     <transition event="success" target="s02"/>
+     <transition event="failure" target="s03"/>
+   </state>
+
+<state id="s02">
+      <invoke type="http://www.w3.org/TR/scxml/">
+          <param conf:name="1" conf:expr="1"/>
+          <content>
+            <scxml initial="sub02" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <datamodel>
+               <data conf:id="1" conf:expr="0"/>
+                </datamodel>
+   
+           <state id="sub02">
+              <transition conf:idVal="1=1" target="subFinal2">
+                  <send target="#_parent" event="success"/>
+                    </transition>
+              <transition  target="subFinal2">
+                    <send target="#_parent" event="failure"/>
+                </transition>
+              </state>
+     
+            <final id="subFinal2"/>
+            </scxml>
+       </content>
+        </invoke>
+        <!-- we got success in s01, so we need to do so here -->
+     <transition event="success" conf:targetpass=""/>
+     <transition event="failure" conf:targetfail=""/>
+  </state>
+  
+<state id="s03">
+      <invoke type="http://www.w3.org/TR/scxml/" >
+          <param conf:name="1" conf:expr="1"/>
+           <content>
+            <scxml initial="sub03" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <datamodel>
+               <data conf:id="1" conf:expr="0"/>
+                </datamodel>
+   
+           <state id="sub03">
+              <transition conf:idVal="1=1" target="subFinal3">
+                  <send target="#_parent" event="success"/>
+                    </transition>
+              <transition  target="subFinal3">
+                    <send target="#_parent" event="failure"/>
+                </transition>
+              </state>
+     
+            <final id="subFinal3"/>
+            </scxml>
+       </content>
+        </invoke>
+        <!-- we got failure in s01, so we need to do so here -->
+     <transition event="failure" conf:targetpass=""/>
+     <transition event="success" conf:targetfail=""/>
+  </state>
+ 
+</state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 57 - 0
test/scxml_test_suite/test242.txml

@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!-- test that markup specified  by 'src' and by <content> is treated the same way.  That means that
+either we get done.invoke in both cases or in neither case (in which case we timeout) -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" >
+  <onentry>
+    <send event="timeout1" delay="1s"/>
+    </onentry>
+    <transition event="timeout" conf:targetfail=""/>
+
+     <invoke type="http://www.w3.org/TR/scxml/"  src="file:test242sub1.scxml"/>
+     <transition event="done.invoke" target="s02"/>
+     <transition event="timeout1" target="s03"/>
+   </state>
+
+<state id="s02">
+    <onentry>
+    <send event="timeout2" delay="1s"/>
+    </onentry>
+      <invoke type="http://www.w3.org/TR/scxml/">
+        <!-- identical to test242sub1.scxml.  -->
+          <content>
+            <scxml version="1.0" initial="subFinal1" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <final id="subFinal1"/>
+              </scxml>
+            </content>
+        </invoke>
+ <!-- we got done.invoke last time, so we need it this time too -->
+  <transition event="done.invoke" conf:targetpass=""/>
+  <transition event="timeout2" conf:targetfail=""/>
+ </state>
+ 
+<state id="s03">
+    <onentry>
+    <send event="timeout3" delay="1s"/>
+    </onentry>
+      <invoke type="http://www.w3.org/TR/scxml/">
+        <!-- identical to test242sub1.scxml.  -->
+          <content>
+            <scxml version="1.0" initial="subFinal2" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <final id="subFinal2"/>
+              </scxml>
+            </content>
+        </invoke>
+ <!-- we got timeout last time, so we need it this time too -->
+  <transition event="timeout3" conf:targetpass=""/>
+  <transition event="done.invoke" conf:targetfail=""/>
+ </state>
+  
+
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 40 - 0
test/scxml_test_suite/test243.txml

@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified by param.
+test240sub1 will return success ifits Var1 is set to 1, failure otherwise.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+   
+      <invoke type="http://www.w3.org/TR/scxml/">
+          <param conf:name="1" conf:expr="1"/>
+          <content>
+            <scxml version="1.0" initial="sub0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <datamodel>
+              <data conf:id="1" conf:expr="0"/>
+                </datamodel>
+   
+            <state id="sub0">
+              <transition conf:idVal="1=1" target="subFinal">
+                 <send target="#_parent" event="success"/>
+                   </transition>
+                  <transition  target="subFinal">
+                   <send target="#_parent" event="failure"/>
+                    </transition>
+                 </state>
+              <final id="subFinal"/>
+               </scxml>
+               </content>
+           </invoke>
+     <transition event="success" conf:targetpass=""/>
+     <transition event="*" conf:targetfail=""/>
+   </state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 43 - 0
test/scxml_test_suite/test244.txml

@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- test that datamodel values can be specified by  namelist.
+invoked child will return success ifits Var1 is set to 1, failure otherwise.  
+This test will fail schema validation due to multiple occurrences of Var1,
+but should run correctly. -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  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 event="timeout" delay="2s"/>
+    </onentry>
+   
+     <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="1">
+        <content>
+          <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <datamodel>
+             <data conf:id="1" conf:expr="0"/>
+             </datamodel>
+   
+         <state id="sub0">
+            <transition conf:idVal="1=1" target="subFinal">
+             <send target="#_parent" event="success"/>
+              </transition>
+             <transition  target="subFinal">
+                 <send target="#_parent" event="failure"/>
+             </transition>
+           </state>    
+            <final id="subFinal"/>
+              </scxml>
+             </content>
+             </invoke>
+     <transition event="success" conf:targetpass=""/>
+     <transition event="*" conf:targetfail=""/>
+   </state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 38 - 0
test/scxml_test_suite/test245.txml

@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- test that non-existent datamodel values are not set.  Var2 is not defined in 
+invoked child's datamodel.  It will will return success if its Var2 remains unbound, failure otherwise.  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="2" conf:expr="3"/>
+  </datamodel>
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+   
+     <invoke type="http://www.w3.org/TR/scxml/"  conf:namelist="2">
+       <content>
+          <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+               <state id="sub0">
+               <transition conf:isBound="2" target="subFinal">
+                <send target="#_parent" event="failure"/>
+            </transition>
+            <transition  target="subFinal">
+              <send target="#_parent" event="success"/>
+              </transition>
+          </state>    
+           <final id="subFinal"/>
+           </scxml>
+           </content>
+          </invoke>
+          
+     <transition event="success" conf:targetpass=""/>
+     <transition event="*" conf:targetfail=""/>
+   </state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 26 - 0
test/scxml_test_suite/test247.txml

@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!-- test that we get done.invoke.  timeout indicates failure  -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+   
+     <invoke type="http://www.w3.org/TR/scxml/">
+       <content>
+         <scxml version="1.0" initial="subFinal" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+           <final id="subFinal"/>
+           </scxml>
+        </content>
+        </invoke>
+     <transition event="done.invoke" conf:targetpass=""/>
+     <transition event="timeout" conf:targetfail=""/>
+   </state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 46 - 0
test/scxml_test_suite/test250.txml

@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- test that the onexit handlers run in the invoked process if it is cancelled.  This has to be a
+manual test, since this process won't accept any events from the child  process once it has been cancelled.
+Tester must examine log output from child process to determine success   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0">
+  <onentry>
+    <send event="foo"/>
+    </onentry>
+   
+     <invoke type="http://www.w3.org/TR/scxml/" >
+         <content>
+           <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+             <state id="sub0" initial="sub01">
+               <onentry>
+                <send event="timeout" delay="2s"/>
+                  </onentry>
+                 <transition event="timeout" target="subFinal"/>
+              <onexit>
+                 <log conf:quoteExpr="Exiting sub0"/>
+                </onexit> 
+             <state id="sub01">
+             <onexit>
+             <log conf:quoteExpr="Exiting sub01"/>
+           </onexit>
+        </state>
+      </state>     
+        <final id="subFinal">
+          <onentry>
+           <log conf:quoteExpr="entering final state, invocation was not cancelled"/>
+          </onentry>
+         </final> 
+      </scxml>
+      </content>
+      </invoke>
+      
+     <!-- this transition will cause the invocation to be cancelled -->
+     <transition event="foo" target="final"/>
+   </state>
+ 
+<final id="final"/>
+</scxml>

+ 51 - 0
test/scxml_test_suite/test252.txml

@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!-- test that we don't process any events received from the invoked process once it is cancelled.  child
+process tries to send us childToParent in an onexit handler.  If we get it, we fail.  
+timeout indicates success.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+     
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" conf:delay="1"/>
+    </onentry>
+    
+    <transition event="timeout" conf:targetpass=""/>
+    <transition event="childToParent" conf:targetfail=""/>
+    <transition event="done.invoke" conf:targetfail=""/>
+    
+    <state id="s01">
+      <onentry>
+        <send event="foo"/>
+        </onentry>
+   
+     <invoke type="http://www.w3.org/TR/scxml/">
+       <content>
+         <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+              <state id="sub0">
+             <onentry>
+             <send event="timeout" conf:delay=".5"/>
+             </onentry> 
+            <transition event="timeout" target="subFinal"/>
+               <onexit>
+               <send target="#_parent" event="childToParent"/>
+            </onexit>
+          </state>  
+          <final id="subFinal"/>
+          </scxml>
+       </content>
+      </invoke>
+      
+     <!-- this transition will cause the invocation to be cancelled -->
+     <transition event="foo" target="s02"/>
+   </state>
+   
+   <state id="s02"/>
+   
+</state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 83 - 0
test/scxml_test_suite/test253.txml

@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<!-- test that the scxml event processor is used in both directions.  If child process uses the 
+scxml event i/o processor to communicate with us, send it an event.  It will send back success if
+this process uses the scxml processor to send the message to it, otherwise failure.  For this test we allow 
+'scxml' as an alternative to the full url.   -->
+
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+  <data conf:id="1"/>
+  </datamodel>
+     
+<state id="s0" initial="s01">
+  <onentry>
+    <send event="timeout" delay="2s"/>
+    </onentry>
+    
+    <transition event="timeout" conf:targetfail=""/>
+    
+    <invoke type="scxml"  id="foo">
+      <content>
+      <!-- inform parent we're running then wait for it to send us an event.  If it uses the scxml event i/o
+             processor to do so, return success, otherwise return failure.   -->
+       <scxml initial="sub0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+         <datamodel>
+          <data conf:id="2"/>
+           </datamodel>
+            <state id="sub0">
+              <onentry>
+               <send target="#_parent" event="childRunning"/>
+            </onentry>
+   
+           <transition event="parentToChild" target="sub1">
+           <assign conf:location="2" conf:eventField="origintype"/>
+          </transition>
+         </state>
+          <state id="sub1">
+            <transition conf:idQuoteVal="2=http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="subFinal">
+             <send target="#_parent" event="success"/>
+                </transition>
+            <transition conf:idQuoteVal="2=scxml" target="subFinal">
+             <send target="#_parent" event="success"/>
+              </transition>
+            <transition target="subFinal">
+                <send target="#_parent" event="failure"/>
+             </transition>
+           </state>
+          <final id="subFinal"/>
+            </scxml>
+        </content>
+        </invoke>
+    
+    <state id="s01">
+    <transition event="childRunning" target="s02">
+       <assign conf:location="1" conf:eventField="origintype"/>
+       </transition>
+   </state>
+    
+    <state id="s02">
+
+     <transition conf:idQuoteVal="1=http://www.w3.org/TR/scxml/#SCXMLEventProcessor" target="s03">
+        <send target="#_foo" event="parentToChild"/>
+        </transition>
+    <transition conf:idQuoteVal="1=scxml" target="s03">
+        <send target="#_foo" event="parentToChild"/>
+        </transition>
+ 
+    <transition conf:targetfail=""/>
+
+    </state>        
+
+     
+     <state id="s03">
+       <transition event="success" conf:targetpass=""/>
+       <transition event="fail" conf:targetfail=""/>
+  
+     </state>   
+
+</state>
+ 
+<conf:pass/>
+<conf:fail/>
+</scxml>

+ 21 - 0
test/scxml_test_suite/test276.txml

@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<!-- test that values passed in from parent process override default values specified in the child, test276sub1.scxml.
+The child returns event1 if var1 has value 1, event0 if it has default value 0.  -->
+
+<scxml initial="s0" version="1.0" conf:datamodel=""  xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+   <state id="s0">
+     <invoke type="scxml" src="file:test276sub1.scxml" >
+       <param conf:name="1" conf:expr="1"/>
+       </invoke>
+       <transition event="event1" conf:targetpass=""/>
+       <transition event="event0" conf:targetfail=""/>
+   </state>
+
+   <conf:pass/>
+   <conf:fail/>
+   
+
+
+</scxml>

+ 32 - 0
test/scxml_test_suite/test277.txml

@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!-- test that platform creates undound variable if we assign an illegal value to it.  Thus
+ we can assign to it later in state s1.  -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""  xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+   <datamodel>
+     <data conf:id="1" conf:illegalExpr=""/>
+     </datamodel>
+     
+ <state id="s0">
+    <onentry>
+    <raise event="foo"/>
+    </onentry>
+    
+   <transition event="error.execution" conf:unboundVar="1" target="s1"/>
+   <transition event="*" conf:targetfail=""/>
+   </state>
+   
+ <state id="s1">
+ <onentry>
+   <assign conf:location="1" conf:expr="1"/>
+   </onentry>
+   <transition  conf:idVal="1=1" conf:targetpass=""/>
+   <transition conf:targetfail=""/>
+
+   </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 22 - 0
test/scxml_test_suite/test278.txml

@@ -0,0 +1,22 @@
+
+<scxml initial="s0" version="1.0" conf:datamodel="ecmascript" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+<!-- test that a variable can be accessed from a state that is outside its lexical scope -->   
+     
+ <state id="s0">
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+
+  <transition  conf:targetfail=""/>
+
+   </state>
+   
+<state id="s1">
+  <datamodel>
+    <data conf:id="1" conf:expr="1"/>
+    </datamodel>
+  </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 25 - 0
test/scxml_test_suite/test279.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!--  testing that in case of early binding variables are assigned values at init time, before
+ the state containing them is visited  -->
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" 
+  xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+   
+     
+ <state id="s0">
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+
+  <transition  conf:targetfail=""/>
+
+   </state>
+   
+<state id="s1">
+  <datamodel>
+    <data conf:id="1" conf:expr="1"/>
+    </datamodel>
+  </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 34 - 0
test/scxml_test_suite/test280.txml

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+
+
+<!-- test late binding.  var2 won't get bound until s1 is entered, so it shouldn't  have a value in s0 and
+accessing it should cause an error. It should get bound before the onentry code in s1 so it should  be
+possible access it there and assign its value to var1 -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" 
+  binding="late" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ 
+ <datamodel>
+   <data conf:id="1"/>
+   </datamodel>  
+     
+ <state id="s0">
+   <transition conf:unboundVar="2" target="s1"/>
+  <transition  conf:targetfail=""/>
+   </state>
+   
+<state id="s1">
+  <datamodel>
+    <data conf:id="2" conf:expr="1"/>
+    </datamodel>
+    <onentry>
+    <assign conf:location="1" conf:varExpr="2"/>
+    </onentry>
+    <transition conf:VarEqVar="1 2" conf:targetpass=""/>
+    <transition conf:targetfail=""/>
+  </state>
+   
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 23 - 0
test/scxml_test_suite/test286.txml

@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+
+<!-- test that assigment to a non-declared var causes an error.  the transition on foo catches the case
+where no error is raised -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" 
+   xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" conf:datamodel="" initial="s0">
+   
+     
+ <state id="s0">
+   <onentry>
+   <assign conf:invalidLocation="" conf:expr="1"/>
+   <raise event="foo"/>
+   </onentry>
+   
+   <transition event="error.execution" conf:targetpass=""/>
+   <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+     
+</scxml>

+ 23 - 0
test/scxml_test_suite/test287.txml

@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- a simple test that a legal value may be assigned to a valid data model location -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" 
+   conf:datamodel="" version="1.0" initial="s0">
+   
+<datamodel>
+    <data conf:id="1" conf:expr="0"/>
+    </datamodel>   
+     
+ <state id="s0">
+   <onentry>
+   <assign conf:location="1" conf:expr="1"/>
+   </onentry>
+   
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+   <transition  conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+     
+</scxml>

+ 49 - 0
test/scxml_test_suite/test294.txml

@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!-- test that a param inside donedata ends up in the data field of the done event and
+that content inside donedata sets the full value of the event.data field -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+  <datamodel>
+    <data conf:id="1" conf:expr="0"/>
+  </datamodel>   
+
+  <state id="s0" initial="s01">
+
+    <transition event="done.state.s0"  conf:eventvarVal="1=1" target="s1">
+    </transition>
+
+    <transition event="done.state.s0"  conf:targetfail="">
+    </transition>
+
+    <state id="s01">
+      <transition target="s02"/>
+    </state>
+    <final id="s02">
+      <donedata>
+        <param conf:name="1" conf:expr="1"/>
+      </donedata>
+    </final>
+  </state>
+
+  <state id="s1" initial="s11">
+
+    <transition event="done.state.s1"  conf:eventdataVal="'foo'" conf:targetpass="">
+    </transition>
+
+    <transition event="done.state.s1"  conf:targetfail="">
+    </transition>
+
+    <state id="s11">
+      <transition target="s12"/>
+    </state>
+    <final id="s12">
+      <donedata>
+        <conf:contentFoo/>
+      </donedata>
+    </final>
+  </state>
+
+  <conf:pass/>
+  <conf:fail/>
+
+</scxml>

+ 32 - 0
test/scxml_test_suite/test298.txml

@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- reference a non-existent data model location in param in donedata and see that the right error is raised -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
+ <datamodel>
+       <data conf:id="1" conf:expr="0"/>
+    </datamodel>   
+     
+ <state id="s0" initial="s01">
+ 	<onentry>
+ 		<send event="timeout" delay="1s"/>
+ 		</onentry>
+ 		
+    <transition event="error.execution" conf:targetpass=""/>
+       <transition event="*" conf:targetfail=""/>
+
+   <state id="s01">
+   <transition target="s02"/>
+   </state>
+   <final id="s02">
+     <donedata>
+      <param conf:name="3" conf:invalidLocation=""/>
+      </donedata>
+     </final>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+     
+</scxml>
+   
+

+ 17 - 0
test/scxml_test_suite/test301.txml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- the processor should  reject this document because it can't download the script.  
+Therefore  we fail if it runs at all. This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <script conf:scriptBadSrc=""/>
+     
+ <state id="s0">
+   <transition conf:targetfail=""/>
+   </state>
+   
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 20 - 0
test/scxml_test_suite/test302.txml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that a script is evaluated at load time.  <conf:script> shoudl assign the value 1 to 
+Var1.  Hence, if script is evaluated at download time, Var1 has a value in the initial state s0.
+This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <conf:script/>
+     
+ <state id="s0">
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+   <transition conf:targetfail=""/>
+   </state>
+   
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 25 - 0
test/scxml_test_suite/test303.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- to test that scripts are run as part of executable content, we check that it changes the value of a var at the
+right point. This test is valid only for datamodels that support scripting -->
+
+<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" 
+	conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+<datamodel>
+<data conf:id="1" conf:expr="0"/>
+</datamodel>
+     
+ <state id="s0">
+   <onentry>
+   <assign conf:location="1" conf:expr="2"/>
+   <conf:script/>
+   </onentry>
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+   <transition conf:targetfail=""/>
+   </state>
+   
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 18 - 0
test/scxml_test_suite/test304.txml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that a variable declared by a script can be accessed like any other part of the data model -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel="" 
+	version="1.0" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+ <conf:script/>
+     
+ <state id="s0">
+   <transition conf:idVal="1=1" conf:targetpass=""/>
+   <transition conf:targetfail=""/>
+   </state>
+   
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 43 - 0
test/scxml_test_suite/test307.txml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?><scxml xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s0" binding="late">
+
+<!-- with binding=late, in s0 we access a variable that isn't created until we get to s1.  Then in s1
+we access a non-existent substructure of a variable.  We use log tags to report the values that both operations
+yield, and whether there are errors.  This is a manual test, since the tester must report whether the output
+is the same in the two cases -->
+
+<state id="s0">
+  <onentry>
+    <log label="entering s0 value of Var 1 is: " conf:varExpr="1"/>
+    <raise event="foo"/>
+   </onentry>
+   <transition event="error" target="s1"> 
+     <log label="error in state s0" conf:expr="_event"/>
+     </transition>
+   <transition event="foo" target="s1">
+     <log label="no error in s0" conf:expr=""/>
+     </transition>
+   </state>
+   
+<state id="s1">
+  <datamodel>
+  <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+ 
+  <onentry>
+   <log label="entering s1, value of non-existent substructure of Var 1 is: " conf:varNonexistentStruct="1"/>
+   <raise event="bar"/>
+   </onentry>
+
+    <transition event="error" target="final"> 
+     <log label="error in state s1" conf:expr="_event"/>
+     </transition>
+   <transition event="bar" target="final">
+     <log label="No error in s1" conf:expr=""/>
+     </transition>
+
+</state>
+    
+<final id="final"/>
+   
+</scxml>

+ 16 - 0
test/scxml_test_suite/test309.txml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that an expression that cannot be interpreted as a boolean is treated as false -->
+
+<scxml version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<state id="s0"> 
+  <transition conf:nonBoolean=""  conf:targetfail=""/>
+  <transition conf:targetpass=""/>
+  </state>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 23 - 0
test/scxml_test_suite/test310.txml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- simple test of the in() predicate -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="p">
+
+     
+ <parallel id="p">
+ 
+   <state id="s0">
+   <transition conf:inState="s1" conf:targetpass=""/> 
+   <transition conf:targetfail=""/>
+   </state>
+
+   <state id="s1"/> 
+ </parallel>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 22 - 0
test/scxml_test_suite/test311.txml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that assignment to a non-existent location yields an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+
+<state id="s0">
+  <onentry>
+  	<send event="timeout" delay="1s"/>
+   <assign conf:invalidLocation="" conf:expr="1"/>
+   </onentry>
+   <transition event="error.execution" conf:targetpass=""/> 
+   <transition event=".*" conf:targetfail=""/>
+   </state>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 25 - 0
test/scxml_test_suite/test312.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- test that assignment with an illegal expr raises an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<datamodel>
+  <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:illegalExpr=""/>
+   <raise event="foo"/>
+   </onentry>
+   <transition event="error.execution" conf:targetpass=""/> 
+   <transition event=".*" conf:targetfail=""/>
+   </state>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 26 - 0
test/scxml_test_suite/test313.txml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- this is a manual test. The processor is allowed to reject this doc, but if it executes it with its illegal
+expression, it must raise an error -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" conf:datamodel=""
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+
+<datamodel>
+  <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+<state id="s0">
+  <onentry>
+   <assign conf:location="1" conf:illegalExpr=""/>
+   <raise event="foo"/>
+   </onentry>
+   <transition event="error.execution" conf:targetpass=""/> 
+   <transition event=".*" conf:targetfail=""/>
+   </state>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 39 - 0
test/scxml_test_suite/test314.txml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- this is a manual test because the processor is allowed to reject this document.  But if it executes it,
+it should not raise an error until it gets to s03 and evaluates the illegal expr -->
+
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" 
+	conf:datamodel="" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
+<datamodel>
+  <data conf:id="1" conf:expr="1"/>
+ </datamodel>
+
+
+<state id="s0" initial="s01">
+  <transition event="error.execution" conf:targetfail=""/>
+  
+   <state id="s01">
+      <transition target="s02"/>
+    </state>
+
+   <state id="s02">
+     <transition target="s03"/>
+   </state>
+
+  <state id="s03">
+    <onentry>
+     <assign conf:location="1" conf:illegalExpr=""/>
+      <raise event="foo"/>
+   </onentry>
+     <transition event="error.execution" conf:targetpass=""/> 
+     <transition event=".*" conf:targetfail=""/>
+  </state>
+   
+</state>
+    
+<conf:pass/>
+<conf:fail/>
+
+   
+</scxml>

+ 31 - 0
test/scxml_test_suite/test318.txml

@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- test that _event stays bound during the onexit and entry into the next state -->
+
+<scxml initial="s0" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" conf:datamodel=""  name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<datamodel>
+ <data conf:id="1"/>
+ </datamodel>
+     
+ <state id="s0">
+   <onentry>
+     <raise event="foo"/>
+   </onentry>
+   <transition event="foo" target="s1"/> 
+   </state>
+   
+ <state id="s1">
+  <onentry>
+    <raise event="bar"/>
+    <!-- _event should still be bound to 'foo' at this point -->
+    <assign conf:location="1" conf:eventName=""/>
+    </onentry>
+   <transition  conf:idQuoteVal="1=foo" conf:targetpass=""/> 
+   <transition conf:targetfail=""/>
+   </state>
+   
+    
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 25 - 0
test/scxml_test_suite/test319.txml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+
+<!-- test that _event is not bound before any event has been raised -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml"
+ name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+ <state id="s0">
+   <onentry>
+     <if conf:systemVarIsBound="_event">
+       <raise event="bound"/>
+       <else/>
+         <raise event="unbound"/>
+     </if>
+   </onentry>
+   <transition event="unbound" conf:targetpass=""/>
+   <transition event="bound" conf:targetfail=""/> 
+
+   </state>
+   
+    
+   <conf:pass/>
+   <conf:fail/>
+     
+</scxml>

+ 0 - 0
test/scxml_test_suite/test321.txml


Some files were not shown because too many files changed in this diff