コード例 #1
0
def test_cons_equiv():
    a = create(thing, thing2, thing3)
    b = create(thing, thing, thing)
    c = create(thing, thing2, thing3)

    assert RT.equiv.invoke2(a, b) is false
    assert RT.equiv.invoke2(a, c) is true
コード例 #2
0
ファイル: test_cons.py プロジェクト: halgari/clojure-metal
def test_cons_equiv():
    a = create(thing, thing2, thing3)
    b = create(thing, thing, thing)
    c = create(thing, thing2, thing3)

    assert RT.equiv.invoke2(a, b) is false
    assert RT.equiv.invoke2(a, c) is true
コード例 #3
0
def test_count():
    a = create(thing, thing2, thing3)

    assert isinstance(RT.count.invoke1(a), WInt)
    assert RT.count.invoke1(a)._int_value == 3
コード例 #4
0
def test_hash():
    a = create(thing, thing2, thing3)
    b = create(thing, thing2, thing3)

    assert isinstance(RT.hash.invoke1(a), WInt)
    assert RT.hash.invoke1(a)._int_value == RT.hash.invoke1(b)._int_value
コード例 #5
0
ファイル: test_cons.py プロジェクト: halgari/clojure-metal
def test_count():
    a = create(thing, thing2, thing3)

    assert isinstance(RT.count.invoke1(a), WInt)
    assert RT.count.invoke1(a)._int_value == 3
コード例 #6
0
ファイル: test_cons.py プロジェクト: halgari/clojure-metal
def test_hash():
    a = create(thing, thing2, thing3)
    b = create(thing, thing2, thing3)

    assert isinstance(RT.hash.invoke1(a), WInt)
    assert RT.hash.invoke1(a)._int_value == RT.hash.invoke1(b)._int_value