Skip to content

Commit

Permalink
Added test case for USERDEFINED predefinedType
Browse files Browse the repository at this point in the history
  • Loading branch information
CBenghi committed Jun 3, 2024
1 parent c1616b4 commit 394f9e4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2022-10-07T13:48:42',(),(),'IfcOpenShell v0.7.0-dc67287d','IfcOpenShell v0.7.0-dc67287d','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCWALLTYPE('1hqIFTRjfV6AWq_bMtnZwI',$,$,$,$,$,$,$,'WALDO',.USERDEFINED.);
ENDSEC;
END-ISO-10303-21;
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<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 http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS">
<info>
<title>A predefined type may specify a user-defined element type</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="A predefined type may specify a user-defined element type" ifcVersion="IFC2X3 IFC4">
<applicability maxOccurs="unbounded">
<entity>
<name>
<simpleValue>IFCWALLTYPE</simpleValue>
</name>
</entity>
</applicability>
<requirements>
<entity>
<name>
<simpleValue>IFCWALLTYPE</simpleValue>
</name>
<predefinedType>
<simpleValue>USERDEFINED</simpleValue>
</predefinedType>
</entity>
</requirements>
</specification>
</specifications>
</ids>
20 changes: 9 additions & 11 deletions Documentation/testcases/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,15 @@ Requirements:
Entity: ''IFCWALLTYPE'',''WALDO''
```

### A predefined type may specify a user-defined element type

``` ids entity/pass-userdefuned_predefined_types_may_be_specified.ids
A predefined type may specify a user-defined element type
Entity: ''IFCWALLTYPE''
Requirements:
Entity: ''IFCWALLTYPE'',''USERDEFINED''
```

### A predefined type may specify a user-defined object type

This custom subType should be allowed, if custom is allowed in the enumeration.
Expand All @@ -868,17 +877,6 @@ Requirements:
Entity: ''IFCTASKTYPE'',''TASKY''
```

### A predefined type must always specify a meaningful type, not USERDEFINED itself

TODO: the group agreed to allow userdefined as a valid option too.

``` suspended ids entity/fail-a_predefined_type_must_always_specify_a_meaningful_type__not_userdefined_itself.ids
A predefined type must always specify a meaningful type, not USERDEFINED itself
Entity: ''IFCWALL''
Requirements:
Entity: ''IFCWALL'',''USERDEFINED''
```

### An entity not matching a specified predefined type will fail

``` ids entity/fail-an_entity_not_matching_a_specified_predefined_type_will_fail.ids
Expand Down

0 comments on commit 394f9e4

Please sign in to comment.