Skip to content

Commit

Permalink
update floating point comparison tests
Browse files Browse the repository at this point in the history
removed attribute and property tests using fixed 1e6 tolerance, replaced with relative precision (according to #294)
  • Loading branch information
atomczak committed May 24, 2024
1 parent 6893df1 commit e29e374
Show file tree
Hide file tree
Showing 81 changed files with 2,159 additions and 126 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Comparison report for property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_3_4.ids</title>
</head>

<body>
<h1>Comparison report for property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_3_4.ids</h1>
<h2>Script</h2>
<pre>
``` ids property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_3_4.ids
Floating point numbers are compared with a 1e-6 tolerance 3/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCREAL,''42.''
```
</pre>
<h2>Comparison to original IDS</h2>
<span>&lt;?xml version="1.0" encoding="utf-16"?&gt;<br>&lt;ids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br> xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS"&gt;<br> &lt;info&gt;<br> &lt;title&gt;Floating point numbers are compared with a 1e-6 tolerance 3/4&lt;/title&gt;<br> &lt;description&gt;Generated via code automation in the Ids Repository on github.&lt;/description&gt;<br> &lt;/info&gt;<br> &lt;specifications&gt;<br> &lt;specification<br> name="Floating point numbers are compared with a 1e-6 tolerance 3/4"<br> ifcVersion="IFC2X3 IFC4"&gt;<br> &lt;applicability<br> maxOccurs="unbounded"&gt;<br> &lt;entity&gt;<br> &lt;name&gt;<br> &lt;simpleValue&gt;IFCWALL&lt;/simpleValue&gt;<br> &lt;/name&gt;<br> &lt;/entity&gt;<br> &lt;/applicability&gt;<br> &lt;requirements&gt;<br> &lt;property<br> dataType="IFCREAL"&gt;<br> &lt;propertySet&gt;<br> &lt;simpleValue&gt;Foo_Bar&lt;/simpleValue&gt;<br> &lt;/propertySet&gt;<br> &lt;baseName&gt;<br> &lt;simpleValue&gt;Foo&lt;/simpleValue&gt;<br> &lt;/baseName&gt;<br> &lt;value&gt;<br> &lt;simpleValue&gt;42.&lt;/simpleValue&gt;<br> &lt;/value&gt;<br> &lt;/property&gt;<br> &lt;/requirements&gt;<br> &lt;/specification&gt;<br> &lt;/specifications&gt;<br>&lt;/ids&gt;</span>
</body>

</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Comparison report for property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_4_4.ids</title>
</head>

<body>
<h1>Comparison report for property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_4_4.ids</h1>
<h2>Script</h2>
<pre>
``` ids property\fail-floating_point_numbers_are_compared_with_a_1e_6_tolerance_4_4.ids
Floating point numbers are compared with a 1e-6 tolerance 4/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCREAL,''42.''
```
</pre>
<h2>Comparison to original IDS</h2>
<span>&lt;?xml version="1.0" encoding="utf-16"?&gt;<br>&lt;ids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br> xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS"&gt;<br> &lt;info&gt;<br> &lt;title&gt;Floating point numbers are compared with a 1e-6 tolerance 4/4&lt;/title&gt;<br> &lt;description&gt;Generated via code automation in the Ids Repository on github.&lt;/description&gt;<br> &lt;/info&gt;<br> &lt;specifications&gt;<br> &lt;specification<br> name="Floating point numbers are compared with a 1e-6 tolerance 4/4"<br> ifcVersion="IFC2X3 IFC4"&gt;<br> &lt;applicability<br> maxOccurs="unbounded"&gt;<br> &lt;entity&gt;<br> &lt;name&gt;<br> &lt;simpleValue&gt;IFCWALL&lt;/simpleValue&gt;<br> &lt;/name&gt;<br> &lt;/entity&gt;<br> &lt;/applicability&gt;<br> &lt;requirements&gt;<br> &lt;property<br> dataType="IFCREAL"&gt;<br> &lt;propertySet&gt;<br> &lt;simpleValue&gt;Foo_Bar&lt;/simpleValue&gt;<br> &lt;/propertySet&gt;<br> &lt;baseName&gt;<br> &lt;simpleValue&gt;Foo&lt;/simpleValue&gt;<br> &lt;/baseName&gt;<br> &lt;value&gt;<br> &lt;simpleValue&gt;42.&lt;/simpleValue&gt;<br> &lt;/value&gt;<br> &lt;/property&gt;<br> &lt;/requirements&gt;<br> &lt;/specification&gt;<br> &lt;/specifications&gt;<br>&lt;/ids&gt;</span>
</body>

</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Comparison report for property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_1_4.ids</title>
</head>

<body>
<h1>Comparison report for property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_1_4.ids</h1>
<h2>Script</h2>
<pre>
``` ids property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_1_4.ids
Floating point numbers are compared with a 1e-6 tolerance 1/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCREAL,''42.''
```
</pre>
<h2>Comparison to original IDS</h2>
<span>&lt;?xml version="1.0" encoding="utf-16"?&gt;<br>&lt;ids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br> xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS"&gt;<br> &lt;info&gt;<br> &lt;title&gt;Floating point numbers are compared with a 1e-6 tolerance 1/4&lt;/title&gt;<br> &lt;description&gt;Generated via code automation in the Ids Repository on github.&lt;/description&gt;<br> &lt;/info&gt;<br> &lt;specifications&gt;<br> &lt;specification<br> name="Floating point numbers are compared with a 1e-6 tolerance 1/4"<br> ifcVersion="IFC2X3 IFC4"&gt;<br> &lt;applicability<br> maxOccurs="unbounded"&gt;<br> &lt;entity&gt;<br> &lt;name&gt;<br> &lt;simpleValue&gt;IFCWALL&lt;/simpleValue&gt;<br> &lt;/name&gt;<br> &lt;/entity&gt;<br> &lt;/applicability&gt;<br> &lt;requirements&gt;<br> &lt;property<br> dataType="IFCREAL"&gt;<br> &lt;propertySet&gt;<br> &lt;simpleValue&gt;Foo_Bar&lt;/simpleValue&gt;<br> &lt;/propertySet&gt;<br> &lt;baseName&gt;<br> &lt;simpleValue&gt;Foo&lt;/simpleValue&gt;<br> &lt;/baseName&gt;<br> &lt;value&gt;<br> &lt;simpleValue&gt;42.&lt;/simpleValue&gt;<br> &lt;/value&gt;<br> &lt;/property&gt;<br> &lt;/requirements&gt;<br> &lt;/specification&gt;<br> &lt;/specifications&gt;<br>&lt;/ids&gt;</span>
</body>

</html>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>
<head>
<title>Comparison report for property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_2_4.ids</title>
</head>

<body>
<h1>Comparison report for property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_2_4.ids</h1>
<h2>Script</h2>
<pre>
``` ids property\pass-floating_point_numbers_are_compared_with_a_1e_6_tolerance_2_4.ids
Floating point numbers are compared with a 1e-6 tolerance 2/4
Entity: ''IFCWALL''
Requirements:
Property: ''Foo_Bar'',''Foo'',IFCREAL,''42.''
```
</pre>
<h2>Comparison to original IDS</h2>
<span>&lt;?xml version="1.0" encoding="utf-16"?&gt;<br>&lt;ids xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"<br> xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd" xmlns="http://standards.buildingsmart.org/IDS"&gt;<br> &lt;info&gt;<br> &lt;title&gt;Floating point numbers are compared with a 1e-6 tolerance 2/4&lt;/title&gt;<br> &lt;description&gt;Generated via code automation in the Ids Repository on github.&lt;/description&gt;<br> &lt;/info&gt;<br> &lt;specifications&gt;<br> &lt;specification<br> name="Floating point numbers are compared with a 1e-6 tolerance 2/4"<br> ifcVersion="IFC2X3 IFC4"&gt;<br> &lt;applicability<br> maxOccurs="unbounded"&gt;<br> &lt;entity&gt;<br> &lt;name&gt;<br> &lt;simpleValue&gt;IFCWALL&lt;/simpleValue&gt;<br> &lt;/name&gt;<br> &lt;/entity&gt;<br> &lt;/applicability&gt;<br> &lt;requirements&gt;<br> &lt;property<br> dataType="IFCREAL"&gt;<br> &lt;propertySet&gt;<br> &lt;simpleValue&gt;Foo_Bar&lt;/simpleValue&gt;<br> &lt;/propertySet&gt;<br> &lt;baseName&gt;<br> &lt;simpleValue&gt;Foo&lt;/simpleValue&gt;<br> &lt;/baseName&gt;<br> &lt;value&gt;<br> &lt;simpleValue&gt;42.&lt;/simpleValue&gt;<br> &lt;/value&gt;<br> &lt;/property&gt;<br> &lt;/requirements&gt;<br> &lt;/specification&gt;<br> &lt;/specifications&gt;<br>&lt;/ids&gt;</span>
</body>

</html>
Expand Down
Loading

0 comments on commit e29e374

Please sign in to comment.