Skip to content

Commit

Permalink
update floating point comparison tests (#304)
Browse files Browse the repository at this point in the history
* update floating point comparison tests

removed attribute and property tests using fixed 1e6 tolerance, replaced with relative precision (according to #294)

* remove old floating point comparison tests

remove omitted tests with a fixed tolerance
  • Loading branch information
atomczak authored Jun 3, 2024
1 parent 35a4d12 commit dc8fcd2
Show file tree
Hide file tree
Showing 81 changed files with 2,023 additions and 206 deletions.

This file was deleted.

This file was deleted.

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\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 dc8fcd2

Please sign in to comment.