예제 #1
0
def test_complex_expr_2():
    r = Tokens(
        expression.parseString(
            r"SIZEOF(QUERY(Afs <* SELF\IfcManifoldSolidBrep.Outer.CfsFaces | "
            r"(NOT ('IFC4X2.IFCADVANCEDFACE' IN TYPEOF(Afs))))) = 0"))
    assert str(r) == r"SIZEOF ( QUERY ( Afs <* SELF \ IfcManifoldSolidBrep . Outer . CfsFaces | " \
                     r"( NOT ( IFC4X2.IFCADVANCEDFACE IN TYPEOF ( Afs ) ) ) ) ) = 0"
예제 #2
0
def test_expression_as_function_call():
    r = Tokens(expression.parseString("ABS(SELF[2])"))
    assert str(r) == "ABS ( SELF [ 2 ] )"
예제 #3
0
def test_complex_expr_1():
    r = Tokens(expression.parseString(r"SIZEOF(a) = 0"))
    assert str(r) == r"SIZEOF ( a ) = 0"
예제 #4
0
def test_sizeof_expr():
    r = Tokens(expression.parseString(r"SIZEOF(a)"))
    assert str(r) == "SIZEOF ( a )"