Skip to content

Latest commit

 

History

History
468 lines (367 loc) · 11.8 KB

testcases-entity.md

File metadata and controls

468 lines (367 loc) · 11.8 KB

Entity 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.

[FAIL] Invalid entities always fail

<entity>
  <name>
    <simpleValue>IFCRABBIT</simpleValue>
  </name>
</entity>
#1=IFCWALL('0PN66raHH4QQ1g$6zEGrRU',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A matching entity should pass

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
</entity>
#1=IFCWALL('1aR5Hnwcz98OES8HsBjdSG',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] An matching entity should pass regardless of predefined type

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
</entity>
#1=IFCWALL('1hle$JuvfBpAV2if17caId',$,$,$,$,$,$,$,.SOLIDWALL.); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] An entity not matching the specified class should fail

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
</entity>
#1=IFCSLAB('2oTmJMZhDEsfN6jMl0vh4m',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Subclasses are not considered as matching

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
</entity>
#1=IFCWALLSTANDARDCASE('3fmNQdmkH1T82kcVuxDl1D',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Entities must be specified as uppercase strings

<entity>
  <name>
    <simpleValue>IfcWall</simpleValue>
  </name>
</entity>
#1=IFCWALL('0$sTjqhFX3lhre0RoDE16J',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A matching predefined type should pass

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>SOLIDWALL</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('2Hl5xImwXDLOXfUVghElTR',$,$,$,$,$,$,$,.SOLIDWALL.); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A null predefined type should always fail a specified predefined types

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>SOLIDWALL</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('1NKsCXcmv0$Ao6_9NSlpjG',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] An entity not matching a specified predefined type will fail

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>SOLIDWALL</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('1FtvA_VyH5v9_45ykOQxof',$,$,$,$,$,$,$,.PARTITIONING.); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A predefined type from an enumeration must be uppercase

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>solidwall</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('1UukhMMhX7wP88EGcOeBby',$,$,$,$,$,$,$,.SOLIDWALL.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A predefined type may specify a user-defined object type

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>WALDO</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('0lop$i0an22hC0GFtfkRQe',$,$,$,'WALDO',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] User-defined types are checked case sensitively

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>WALDO</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('3Rdm1JzOH2vvg59Tfi$Tyl',$,$,$,'waldo',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A predefined type may specify a user-defined element type

<entity>
  <name>
    <simpleValue>IFCWALLTYPE</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>WALDO</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALLTYPE('0OXXtCYYbAQP9mrN_CnIKe',$,$,$,$,$,$,$,'WALDO',.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] A predefined type may specify a user-defined process type

<entity>
  <name>
    <simpleValue>IFCTASKTYPE</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>TASKY</simpleValue>
  </predefinedType>
</entity>
#1=IFCTASKTYPE('31wzn1tiP7vh7$fnZojOsg',$,$,$,$,$,$,$,'TASKY',.USERDEFINED.,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] A predefined type must always specify a meaningful type, not USERDEFINED itself

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>USERDEFINED</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('29XOgfwprC$B9YVqonvU4_',$,$,$,'WALDO',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Inherited predefined types should pass

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>X</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('2ERMTIzsL7Lv5n4IjG0fWg',$,$,$,$,$,$,$,$); /* Testcase */
#2=IFCWALLTYPE('1wrVkTQIL0PO34wIeg9lmQ',$,$,$,$,$,$,$,'X',.USERDEFINED.);
#3=IFCRELDEFINESBYTYPE('2wKaA4Ykb6lRo6ytiBOb0d',$,$,$,(#1),#2);

Sample IDS - Sample IFC: 1

[PASS] Overridden predefined types should pass

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <simpleValue>X</simpleValue>
  </predefinedType>
</entity>
#1=IFCWALL('3pd6qLf7z2t8VMwKxx26Qg',$,$,$,'X',$,$,$,.USERDEFINED.); /* Testcase */
#2=IFCWALLTYPE('2qs3jH$lzC8vxg$isYkC6C',$,$,$,$,$,$,$,$,.NOTDEFINED.);
#3=IFCRELDEFINESBYTYPE('0ZtwWfPGXEL85XS7gFcCGg',$,$,$,(#1),#2);

Sample IDS - Sample IFC: 1

[PASS] Entities can be specified as an enumeration 1/3

<entity>
  <name>
    <xs:restriction base="xs:string">
      <xs:enumeration value="IFCWALL"/>
      <xs:enumeration value="IFCSLAB"/>
    </xs:restriction>
  </name>
</entity>
#1=IFCWALL('0tSzdGkKb89htb2XjPEbxA',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Entities can be specified as an enumeration 2/3

<entity>
  <name>
    <xs:restriction base="xs:string">
      <xs:enumeration value="IFCWALL"/>
      <xs:enumeration value="IFCSLAB"/>
    </xs:restriction>
  </name>
</entity>
#1=IFCSLAB('1iyN6FMOP7GwbozUuU42m0',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Entities can be specified as an enumeration 3/3

<entity>
  <name>
    <xs:restriction base="xs:string">
      <xs:enumeration value="IFCWALL"/>
      <xs:enumeration value="IFCSLAB"/>
    </xs:restriction>
  </name>
</entity>
#1=IFCBEAM('2bBUe2R0b9dvOpCnq_Qfkm',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Entities can be specified as a XSD regex pattern 1/2

<entity>
  <name>
    <xs:restriction base="xs:string">
      <xs:pattern value="IFC.*TYPE"/>
    </xs:restriction>
  </name>
</entity>
#1=IFCWALL('23RVloAM566P_TmX4fYS_M',$,$,$,$,$,$,$,$); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Entities can be specified as a XSD regex pattern 2/2

<entity>
  <name>
    <xs:restriction base="xs:string">
      <xs:pattern value="IFC.*TYPE"/>
    </xs:restriction>
  </name>
</entity>
#1=IFCWALLTYPE('19v0GfRDD2UPa5aSDxsRTZ',$,$,$,$,$,$,$,$,.ELEMENTEDWALL.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Restrictions an be specified for the predefined type 1/3

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <xs:restriction base="xs:string">
      <xs:pattern value="FOO.*"/>
    </xs:restriction>
  </predefinedType>
</entity>
#1=IFCWALL('3_26sgRW96r8d$iSmhzJFh',$,$,$,'FOOBAR',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[PASS] Restrictions an be specified for the predefined type 2/3

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <xs:restriction base="xs:string">
      <xs:pattern value="FOO.*"/>
    </xs:restriction>
  </predefinedType>
</entity>
#1=IFCWALL('2lcbUouZ93U9bunLnnaGJ$',$,$,$,'FOOBAZ',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1

[FAIL] Restrictions an be specified for the predefined type 3/3

<entity>
  <name>
    <simpleValue>IFCWALL</simpleValue>
  </name>
  <predefinedType>
    <xs:restriction base="xs:string">
      <xs:pattern value="FOO.*"/>
    </xs:restriction>
  </predefinedType>
</entity>
#1=IFCWALL('1m9oC3eIX7Og9Jx6gVeY83',$,$,$,'BAZFOO',$,$,$,.USERDEFINED.); /* Testcase */

Sample IDS - Sample IFC: 1