Skip to content

Commit

Permalink
Tested and fixed proposed tests
Browse files Browse the repository at this point in the history
Minor fix in IDS script syntax and adjusted script:
- minor title fix
- removed redundant "requirements:" lines
  • Loading branch information
CBenghi committed Mar 29, 2024
1 parent 200c08d commit 2ca4a2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?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>Prohibited specifications fails if applicability matches</title>
<title>Prohibited specifications fails if the applicability matches</title>
<description>Generated via code automation in the Ids Repository on github.</description>
</info>
<specifications>
<specification name="Prohibited specifications fails if applicability matches" ifcVersion="IFC2X3">
<specification name="Prohibited specifications fails if the applicability matches" ifcVersion="IFC2X3">
<applicability minOccurs="0" maxOccurs="0">
<entity>
<name>
Expand Down
4 changes: 1 addition & 3 deletions Documentation/testcases/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,10 @@ Attribute: ''Name'',''Waldo''
### Prohibited specifications fails if the applicability matches

``` ids ids/fail-prohibited_specifications_fails_if_the_applicability_matches.ids
Prohibited specifications fails if applicability matches
Prohibited specifications fails if the applicability matches
Prohibited
IFC2X3
Entity: ''IFCWALL''
Requirements:
```

### Prohibited specifications passes if the applicability does not matches
Expand All @@ -1162,7 +1161,6 @@ Prohibited specifications passes if the applicability does not matches
Prohibited
IFC2X3
Entity: ''IFCWINDOW''
Requirements:
```

### Required specifications need at least one applicable entity (1/2)
Expand Down
2 changes: 1 addition & 1 deletion SchemaProject/DocAutomation/IdsScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ internal void WriteTo(TextWriter writer)
{
writer.WriteLine(item);
}
if (RequirementFacetStrings != null)
if (RequirementFacetStrings != null && RequirementFacetStrings.Any())
{
writer.WriteLine("Requirements:");
foreach (var item in RequirementFacetStrings)
Expand Down
2 changes: 1 addition & 1 deletion SchemaProject/program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ private static void RegenIDS()
var invalidFileName = item.FullName.Replace("fail-", "invalid-");
if (missingIfcFileNames.Contains(invalidFileName))
{
Console.WriteLine("Suitable matching invalid IFC is found, it has been renamed.");
File.Move(item.FullName, invalidFileName);
// Console.WriteLine("A matching invalid IFC is required, should you rename this?");
}
//else if (allIfcFound)
//{
Expand Down

0 comments on commit 2ca4a2c

Please sign in to comment.