Skip to content

Commit adfd994

Browse files
committed
New restriction test cases
1 parent d8cea7d commit adfd994

29 files changed

+457
-17
lines changed

Documentation/testcases-restriction.md

+134-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ These testcases are designed to help describe behaviour in edge cases and ambigu
2424

2525
[Sample IDS](testcases/restriction/pass-an_enumeration_matches_case_sensitively_1_3.ids) - [Sample IFC: 1](testcases/restriction/pass-an_enumeration_matches_case_sensitively_1_3.ifc)
2626

27-
## [PASS] An enumeration matches case sensitively 1/3
27+
## [PASS] An enumeration matches case sensitively 2/3
2828

2929
~~~xml
3030
<attribute minOccurs="1" maxOccurs="1">
@@ -44,9 +44,9 @@ These testcases are designed to help describe behaviour in edge cases and ambigu
4444
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Bar',$,$,$,$,$,$); /* Testcase */
4545
~~~
4646

47-
[Sample IDS](testcases/restriction/pass-an_enumeration_matches_case_sensitively_1_3.ids) - [Sample IFC: 1](testcases/restriction/pass-an_enumeration_matches_case_sensitively_1_3.ifc)
47+
[Sample IDS](testcases/restriction/pass-an_enumeration_matches_case_sensitively_2_3.ids) - [Sample IFC: 1](testcases/restriction/pass-an_enumeration_matches_case_sensitively_2_3.ifc)
4848

49-
## [FAIL] An enumeration matches case sensitively 1/3
49+
## [FAIL] An enumeration matches case sensitively 3/3
5050

5151
~~~xml
5252
<attribute minOccurs="1" maxOccurs="1">
@@ -66,7 +66,7 @@ These testcases are designed to help describe behaviour in edge cases and ambigu
6666
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Baz',$,$,$,$,$,$); /* Testcase */
6767
~~~
6868

69-
[Sample IDS](testcases/restriction/fail-an_enumeration_matches_case_sensitively_1_3.ids) - [Sample IFC: 1](testcases/restriction/fail-an_enumeration_matches_case_sensitively_1_3.ifc)
69+
[Sample IDS](testcases/restriction/fail-an_enumeration_matches_case_sensitively_3_3.ids) - [Sample IFC: 1](testcases/restriction/fail-an_enumeration_matches_case_sensitively_3_3.ifc)
7070

7171
## [PASS] A bound can be inclusive 1/4
7272

@@ -285,3 +285,133 @@ These testcases are designed to help describe behaviour in edge cases and ambigu
285285

286286
[Sample IDS](testcases/restriction/fail-regex_patterns_can_be_used_3_3.ids) - [Sample IFC: 1](testcases/restriction/fail-regex_patterns_can_be_used_3_3.ifc)
287287

288+
## [PASS] Length checks can be used 1/2
289+
290+
~~~xml
291+
<attribute minOccurs="1" maxOccurs="1">
292+
<name>
293+
<simpleValue>Name</simpleValue>
294+
</name>
295+
<value>
296+
<xs:restriction base="xs:string">
297+
<xs:length value="2" fixed="false"/>
298+
</xs:restriction>
299+
</value>
300+
</attribute>
301+
~~~
302+
303+
~~~lua
304+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'AB',$,$,$,$,$,$); /* Testcase */
305+
~~~
306+
307+
[Sample IDS](testcases/restriction/pass-length_checks_can_be_used_1_2.ids) - [Sample IFC: 1](testcases/restriction/pass-length_checks_can_be_used_1_2.ifc)
308+
309+
## [FAIL] Length checks can be used 1/2
310+
311+
~~~xml
312+
<attribute minOccurs="1" maxOccurs="1">
313+
<name>
314+
<simpleValue>Name</simpleValue>
315+
</name>
316+
<value>
317+
<xs:restriction base="xs:string">
318+
<xs:length value="2" fixed="false"/>
319+
</xs:restriction>
320+
</value>
321+
</attribute>
322+
~~~
323+
324+
~~~lua
325+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABC',$,$,$,$,$,$); /* Testcase */
326+
~~~
327+
328+
[Sample IDS](testcases/restriction/fail-length_checks_can_be_used_1_2.ids) - [Sample IFC: 1](testcases/restriction/fail-length_checks_can_be_used_1_2.ifc)
329+
330+
## [FAIL] Max and min length checks can be used 1/3
331+
332+
~~~xml
333+
<attribute minOccurs="1" maxOccurs="1">
334+
<name>
335+
<simpleValue>Name</simpleValue>
336+
</name>
337+
<value>
338+
<xs:restriction base="xs:string">
339+
<xs:minLength value="2" fixed="false"/>
340+
<xs:maxLength value="3" fixed="false"/>
341+
</xs:restriction>
342+
</value>
343+
</attribute>
344+
~~~
345+
346+
~~~lua
347+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'A',$,$,$,$,$,$); /* Testcase */
348+
~~~
349+
350+
[Sample IDS](testcases/restriction/fail-max_and_min_length_checks_can_be_used_1_3.ids) - [Sample IFC: 1](testcases/restriction/fail-max_and_min_length_checks_can_be_used_1_3.ifc)
351+
352+
## [PASS] Max and min length checks can be used 2/3
353+
354+
~~~xml
355+
<attribute minOccurs="1" maxOccurs="1">
356+
<name>
357+
<simpleValue>Name</simpleValue>
358+
</name>
359+
<value>
360+
<xs:restriction base="xs:string">
361+
<xs:minLength value="2" fixed="false"/>
362+
<xs:maxLength value="3" fixed="false"/>
363+
</xs:restriction>
364+
</value>
365+
</attribute>
366+
~~~
367+
368+
~~~lua
369+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'AB',$,$,$,$,$,$); /* Testcase */
370+
~~~
371+
372+
[Sample IDS](testcases/restriction/pass-max_and_min_length_checks_can_be_used_2_3.ids) - [Sample IFC: 1](testcases/restriction/pass-max_and_min_length_checks_can_be_used_2_3.ifc)
373+
374+
## [PASS] Max and min length checks can be used 3/3
375+
376+
~~~xml
377+
<attribute minOccurs="1" maxOccurs="1">
378+
<name>
379+
<simpleValue>Name</simpleValue>
380+
</name>
381+
<value>
382+
<xs:restriction base="xs:string">
383+
<xs:minLength value="2" fixed="false"/>
384+
<xs:maxLength value="3" fixed="false"/>
385+
</xs:restriction>
386+
</value>
387+
</attribute>
388+
~~~
389+
390+
~~~lua
391+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABC',$,$,$,$,$,$); /* Testcase */
392+
~~~
393+
394+
[Sample IDS](testcases/restriction/pass-max_and_min_length_checks_can_be_used_3_3.ids) - [Sample IFC: 1](testcases/restriction/pass-max_and_min_length_checks_can_be_used_3_3.ifc)
395+
396+
## [FAIL] Max and min length checks can be used 4/3
397+
398+
~~~xml
399+
<attribute minOccurs="1" maxOccurs="1">
400+
<name>
401+
<simpleValue>Name</simpleValue>
402+
</name>
403+
<value>
404+
<xs:restriction base="xs:string">
405+
<xs:minLength value="2" fixed="false"/>
406+
<xs:maxLength value="3" fixed="false"/>
407+
</xs:restriction>
408+
</value>
409+
</attribute>
410+
~~~
411+
412+
~~~lua
413+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABCD',$,$,$,$,$,$); /* Testcase */
414+
~~~
415+
416+
[Sample IDS](testcases/restriction/fail-max_and_min_length_checks_can_be_used_4_3.ids) - [Sample IFC: 1](testcases/restriction/fail-max_and_min_length_checks_can_be_used_4_3.ifc)
417+

Documentation/testcases/restriction/fail-a_bound_can_be_inclusive_1_3.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

Documentation/testcases/restriction/fail-a_bound_can_be_inclusive_3_3.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

Documentation/testcases/restriction/fail-a_bound_can_be_inclusive_4_4.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

Documentation/testcases/restriction/fail-an_enumeration_matches_case_sensitively_1_3.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T21:58:50',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<ids xmlns="http://standards.buildingsmart.org/IDS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS/ids_05.xsd">
2+
<info>
3+
<title>An enumeration matches case sensitively 3/3</title>
4+
</info>
5+
<specifications>
6+
<specification name="An enumeration matches case sensitively 3/3" ifcVersion="IFC2X3 IFC4" minOccurs="0" maxOccurs="unbounded">
7+
<applicability>
8+
<entity>
9+
<name>
10+
<simpleValue>IfcWall</simpleValue>
11+
</name>
12+
</entity>
13+
</applicability>
14+
<requirements>
15+
<attribute minOccurs="1" maxOccurs="1">
16+
<name>
17+
<simpleValue>Name</simpleValue>
18+
</name>
19+
<value>
20+
<xs:restriction base="xs:string">
21+
<xs:enumeration value="Foo" />
22+
<xs:enumeration value="Bar" />
23+
</xs:restriction>
24+
</value>
25+
</attribute>
26+
</requirements>
27+
</specification>
28+
</specifications>
29+
</ids>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ISO-10303-21;
2+
HEADER;
3+
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
5+
FILE_SCHEMA(('IFC4'));
6+
ENDSEC;
7+
DATA;
8+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'Baz',$,$,$,$,$,$);
9+
ENDSEC;
10+
END-ISO-10303-21;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<ids xmlns="http://standards.buildingsmart.org/IDS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS/ids_05.xsd">
2+
<info>
3+
<title>Length checks can be used 1/2</title>
4+
</info>
5+
<specifications>
6+
<specification name="Length checks can be used 1/2" ifcVersion="IFC2X3 IFC4" minOccurs="0" maxOccurs="unbounded">
7+
<applicability>
8+
<entity>
9+
<name>
10+
<simpleValue>IfcWall</simpleValue>
11+
</name>
12+
</entity>
13+
</applicability>
14+
<requirements>
15+
<attribute minOccurs="1" maxOccurs="1">
16+
<name>
17+
<simpleValue>Name</simpleValue>
18+
</name>
19+
<value>
20+
<xs:restriction base="xs:string">
21+
<xs:length value="2" fixed="false" />
22+
</xs:restriction>
23+
</value>
24+
</attribute>
25+
</requirements>
26+
</specification>
27+
</specifications>
28+
</ids>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ISO-10303-21;
2+
HEADER;
3+
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
5+
FILE_SCHEMA(('IFC4'));
6+
ENDSEC;
7+
DATA;
8+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABC',$,$,$,$,$,$);
9+
ENDSEC;
10+
END-ISO-10303-21;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<ids xmlns="http://standards.buildingsmart.org/IDS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS/ids_05.xsd">
2+
<info>
3+
<title>Max and min length checks can be used 1/3</title>
4+
</info>
5+
<specifications>
6+
<specification name="Max and min length checks can be used 1/3" ifcVersion="IFC2X3 IFC4" minOccurs="0" maxOccurs="unbounded">
7+
<applicability>
8+
<entity>
9+
<name>
10+
<simpleValue>IfcWall</simpleValue>
11+
</name>
12+
</entity>
13+
</applicability>
14+
<requirements>
15+
<attribute minOccurs="1" maxOccurs="1">
16+
<name>
17+
<simpleValue>Name</simpleValue>
18+
</name>
19+
<value>
20+
<xs:restriction base="xs:string">
21+
<xs:minLength value="2" fixed="false" />
22+
<xs:maxLength value="3" fixed="false" />
23+
</xs:restriction>
24+
</value>
25+
</attribute>
26+
</requirements>
27+
</specification>
28+
</specifications>
29+
</ids>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ISO-10303-21;
2+
HEADER;
3+
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
5+
FILE_SCHEMA(('IFC4'));
6+
ENDSEC;
7+
DATA;
8+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'A',$,$,$,$,$,$);
9+
ENDSEC;
10+
END-ISO-10303-21;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<ids xmlns="http://standards.buildingsmart.org/IDS" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS/ids_05.xsd">
2+
<info>
3+
<title>Max and min length checks can be used 4/3</title>
4+
</info>
5+
<specifications>
6+
<specification name="Max and min length checks can be used 4/3" ifcVersion="IFC2X3 IFC4" minOccurs="0" maxOccurs="unbounded">
7+
<applicability>
8+
<entity>
9+
<name>
10+
<simpleValue>IfcWall</simpleValue>
11+
</name>
12+
</entity>
13+
</applicability>
14+
<requirements>
15+
<attribute minOccurs="1" maxOccurs="1">
16+
<name>
17+
<simpleValue>Name</simpleValue>
18+
</name>
19+
<value>
20+
<xs:restriction base="xs:string">
21+
<xs:minLength value="2" fixed="false" />
22+
<xs:maxLength value="3" fixed="false" />
23+
</xs:restriction>
24+
</value>
25+
</attribute>
26+
</requirements>
27+
</specification>
28+
</specifications>
29+
</ids>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ISO-10303-21;
2+
HEADER;
3+
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
5+
FILE_SCHEMA(('IFC4'));
6+
ENDSEC;
7+
DATA;
8+
#1=IFCWALL('1hqIFTRjfV6AWq_bMtnZwI',$,'ABCD',$,$,$,$,$,$);
9+
ENDSEC;
10+
END-ISO-10303-21;

Documentation/testcases/restriction/fail-regex_patterns_can_be_used_3_3.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

Documentation/testcases/restriction/pass-a_bound_can_be_inclusive_1_4.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

Documentation/testcases/restriction/pass-a_bound_can_be_inclusive_2_3.ifc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ISO-10303-21;
22
HEADER;
33
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
4-
FILE_NAME('','2022-09-13T19:27:09',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
4+
FILE_NAME('','2022-09-13T22:07:18',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
55
FILE_SCHEMA(('IFC4'));
66
ENDSEC;
77
DATA;

0 commit comments

Comments
 (0)