changeset 1110:f53b1098795f

Minor fixes to test_create to match specification (was building empty interface nodes).
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 18 Feb 2016 12:11:09 +0000
parents 1796ab711cdc
children 9fea17d1781b
files core.js test-schema.xsd test_create/test_core.js test_create/test_create.html
diffstat 4 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/core.js	Thu Feb 18 10:55:36 2016 +0000
+++ b/core.js	Thu Feb 18 12:11:09 2016 +0000
@@ -2263,7 +2263,7 @@
 			this.id = null;
 			this.parent = null;
 			this.type = null;
-			this.marker = false;
+			this.marker = null;
 			this.enforce = false;
 			this.gain = 1.0;
 			this.schema = specification.schema.getAllElementsByName('audioelement')[0];;
--- a/test-schema.xsd	Thu Feb 18 10:55:36 2016 +0000
+++ b/test-schema.xsd	Thu Feb 18 12:11:09 2016 +0000
@@ -168,7 +168,7 @@
   <xs:element name="survey">
     <xs:complexType>
       <xs:sequence>
-        <xs:element name="surveyentry" maxOccurs="unbounded">
+        <xs:element name="surveyentry" minOccurs="0" maxOccurs="unbounded">
           <xs:complexType>
             <xs:sequence>
               <xs:element ref="statement" minOccurs="1" maxOccurs="1"/>
--- a/test_create/test_core.js	Thu Feb 18 10:55:36 2016 +0000
+++ b/test_create/test_core.js	Thu Feb 18 12:11:09 2016 +0000
@@ -1872,6 +1872,9 @@
         }
         
         // Build the components
+        if (this.specification.interfaces.length == 0) {
+            this.specification.interfaces.push(new specification.interfaceNode());
+        }
         for (var interfaceObj of this.specification.interfaces)
         {
             var newInterface = new this.parent.interfaceNode(this.parent,interfaceObj);
--- a/test_create/test_create.html	Thu Feb 18 10:55:36 2016 +0000
+++ b/test_create/test_create.html	Thu Feb 18 12:11:09 2016 +0000
@@ -572,7 +572,7 @@
                     this.id = null;
                     this.parent = null;
                     this.type = null;
-                    this.marker = false;
+                    this.marker = null;
                     this.enforce = false;
                     this.gain = 1.0;
                     this.schema = specification.schema.getAllElementsByName('audioelement')[0];;