mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 11:20:21 +00:00
Express rules: test case for instance comparison
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import ifcopenshell
|
||||
|
||||
fns = [
|
||||
(False, lambda f: f.createIfcLengthMeasure(-1.)),
|
||||
(True, lambda f: f.createIfcLengthMeasure(1.)),
|
||||
(True, lambda f: f.createIfcPositiveLengthMeasure(1.)),
|
||||
(False, lambda f: f.createIfcDescriptiveMeasure('large'))
|
||||
]
|
||||
|
||||
for valid, fn in fns:
|
||||
f = ifcopenshell.file(schema="IFC4")
|
||||
fs = fn(f)
|
||||
f.createIfcTextStyleFontModel('Comic Sans', ('Comic Sans',), FontSize=fs)
|
||||
f.write(f"{'pass' if valid else 'fail'}-font-{fs.is_a()}-{fs[0]}.ifc")
|
||||
Reference in New Issue
Block a user