diff --git a/ids-lib/IdsSchema/XsNodes/XsRestriction.cs b/ids-lib/IdsSchema/XsNodes/XsRestriction.cs
index 54b0435..1b4842d 100644
--- a/ids-lib/IdsSchema/XsNodes/XsRestriction.cs
+++ b/ids-lib/IdsSchema/XsNodes/XsRestriction.cs
@@ -131,7 +131,7 @@ protected internal override Audit.Status PerformAudit(AuditStateInformation stat
if (Base == BaseTypes.Invalid)
ret |= IdsErrorMessages.Report303RestrictionBadType(logger, this, BaseAsString);
if (!Children.Any())
- IdsErrorMessages.Report304RestrictionEmptyContent(logger, this);
+ ret |= IdsErrorMessages.Report304RestrictionEmptyContent(logger, this);
return ret;
}
}
diff --git a/ids-tool.tests/IssueFiles/Issue 28 - Empty restriction.ids b/ids-tool.tests/IssueFiles/Issue 28 - Empty restriction.ids
new file mode 100644
index 0000000..eb044eb
--- /dev/null
+++ b/ids-tool.tests/IssueFiles/Issue 28 - Empty restriction.ids
@@ -0,0 +1,30 @@
+
+
+
+ New ids file2
+ jhnkjn3333
+
+
+
+
+
+
+ IFCACTUATOR
+
+
+
+
+ asca
+
+
+
+
+
+ w
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ids-tool.tests/IssueTests.cs b/ids-tool.tests/IssueTests.cs
index 22ea5b8..c6eb3ff 100644
--- a/ids-tool.tests/IssueTests.cs
+++ b/ids-tool.tests/IssueTests.cs
@@ -40,10 +40,17 @@ public void Issue11_IfcLogicalIsValidDatatype()
}
[Fact]
- public void Issue11_IfcPropertySetFound()
+ public void Issue25_IfcPropertySetFound()
{
var f = new FileInfo("IssueFiles/Issue 25 - Pset_ConstructionOccurence.ids");
LoggerAndAuditHelpers.FullAudit(f, XunitOutputHelper, IdsLib.Audit.Status.Ok);
}
+
+ [Fact]
+ public void Issue_28_EmptyRestriction()
+ {
+ var f = new FileInfo("IssueFiles/Issue 28 - Empty restriction.ids");
+ LoggerAndAuditHelpers.FullAudit(f, XunitOutputHelper, IdsLib.Audit.Status.IdsContentError, 1);
+ }
}
}
diff --git a/ids-tool.tests/ids-tool.tests.csproj b/ids-tool.tests/ids-tool.tests.csproj
index a3f14c2..5de1694 100644
--- a/ids-tool.tests/ids-tool.tests.csproj
+++ b/ids-tool.tests/ids-tool.tests.csproj
@@ -174,6 +174,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest