Exemple #1
0
def test_type_structure():
    sig = c_type_sig(["a", "b"], "o")
    eq_(len(sig.inputs), 2)
Exemple #2
0
def test_type_classes():
    eq_(c_type_sig(['bool'], 'Q<T>'), FuncSig(('bool', ), 'Q<T>'))
Exemple #3
0
def test_str_rep():
    eq_(str(c_type_sig(['bool', 'int'], 'Q<T>', method='Q<T>')),
        "(Q<T>, bool, int) -> Q<T>")
Exemple #4
0
def test_void_elimination():
    eq_(c_type_sig(["void"], "b", method="A"), FuncSig(("A", ), "b"))
Exemple #5
0
def test_void_alias():
    eq_(c_type_sig([], 'a'), FuncSig(('void', ), 'a'))
Exemple #6
0
def test_boxing():
    eq_(c_type_sig(["int **"], "int*"), FuncSig(("int**", ), ("int*")))
Exemple #7
0
def test_method():
    eq_(c_type_sig(["a"], "b", method="A"), FuncSig(("A", "a"), "b"))
Exemple #8
0
def test_str_rep():
    eq_(str(c_type_sig(['bool', 'int'], 'Q<T>', method='Q<T>')),
        "(Q<T>, bool, int) -> Q<T>")
Exemple #9
0
def test_type_structure():
    sig = c_type_sig(["a", "b"], "o")
    eq_(len(sig.inputs), 2)
Exemple #10
0
def test_type_classes():
    eq_(c_type_sig(['bool'], 'Q<T>'), FuncSig(('bool',), 'Q<T>'))
Exemple #11
0
def test_void_alias():
    eq_(c_type_sig([], 'a'), FuncSig(('void',), 'a'))
Exemple #12
0
def test_void_elimination():
    eq_(c_type_sig(["void"], "b", method="A"), FuncSig(("A",), "b"))
Exemple #13
0
def test_method():
    eq_(c_type_sig(["a"], "b", method="A"), FuncSig(("A", "a"), "b"))
Exemple #14
0
def test_boxing():
    eq_(c_type_sig(["int **"], "int*"), FuncSig(("int**",), ("int*")))