Skip to content

Latest commit

 

History

History
438 lines (356 loc) · 11.3 KB

File metadata and controls

438 lines (356 loc) · 11.3 KB

Restriction testcases

These testcases are designed to help describe behaviour in edge cases and ambiguities. All valid IDS implementations must demonstrate identical behaviour to these test cases.

[PASS] An enumeration matches case sensitively 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Foo',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] An enumeration matches case sensitively 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Bar',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] An enumeration matches case sensitively 3/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foo"/>
      <xs:enumeration value="Bar"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Baz',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A bound can be inclusive 1/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0" fixed="false"/>
      <xs:maxInclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(0.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A bound can be inclusive 2/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0" fixed="false"/>
      <xs:maxInclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(5.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A bound can be inclusive 3/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0" fixed="false"/>
      <xs:maxInclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(10.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A bound can be inclusive 4/4

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0" fixed="false"/>
      <xs:maxInclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(100.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A bound can be inclusive 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minExclusive value="0" fixed="false"/>
      <xs:maxExclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(0.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A bound can be inclusive 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minExclusive value="0" fixed="false"/>
      <xs:maxExclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(5.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A bound can be inclusive 3/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:integer">
      <xs:minExclusive value="0" fixed="false"/>
      <xs:maxExclusive value="10" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(10.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Regex patterns can be used 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}[0-9]{2}"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'WT01',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Regex patterns can be used 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}[0-9]{2}"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'XY99',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Regex patterns can be used 3/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}[0-9]{2}"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'A5',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Patterns only work on strings and nothing else

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>RefractionIndex</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:pattern value=".*"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCSURFACESTYLEREFRACTION(42.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Length checks can be used 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:length value="2" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'AB',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Length checks can be used 1/2

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:length value="2" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABC',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Max and min length checks can be used 1/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:minLength value="2" fixed="false"/>
      <xs:maxLength value="3" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'A',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Max and min length checks can be used 2/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:minLength value="2" fixed="false"/>
      <xs:maxLength value="3" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'AB',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Max and min length checks can be used 3/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:minLength value="2" fixed="false"/>
      <xs:maxLength value="3" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABC',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Max and min length checks can be used 4/3

<attribute minOccurs="1" maxOccurs="1">
  <name>
    <simpleValue>Name</simpleValue>
  </name>
  <value>
    <xs:restriction base="xs:string">
      <xs:minLength value="2" fixed="false"/>
      <xs:maxLength value="3" fixed="false"/>
    </xs:restriction>
  </value>
</attribute>
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABCD',$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1