# Path: prolog/interpreter/test/tool.py
# def assert_true(query, e=None):
#     if e is None:
#         e = Engine()
#     terms, vars = e.parse(query)
#     term, = terms
#     e.run_query_in_current(term)
#     return dict([(name, var.dereference(None))
#                      for name, var in vars.iteritems()])
# 
# def assert_false(query, e=None):
#     if e is None:
#         e = Engine()
#     term = e.parse(query)[0][0]
#     py.test.raises(UnificationFailed, e.run_query_in_current, term)


import py
from prolog.interpreter.test.tool import assert_true, assert_false

# sionu ~=~ structural identical or not unifiable
def test_basic_sionu():
    assert_false("?=(X, Y).")
    assert_true("?=(X, X).")
    assert_true("?=(1, 1).")
    assert_true("?=(1, 2).")
    assert_false("?=(X, 1).")

# Path: prolog/interpreter/test/tool.py
# def assert_true(query, e=None):
#     if e is None:
#         e = Engine()
#     terms, vars = e.parse(query)
#     term, = terms
#     e.run_query_in_current(term)
#     return dict([(name, var.dereference(None))
#                      for name, var in vars.iteritems()])
# 
# def assert_false(query, e=None):
#     if e is None:
#         e = Engine()
#     term = e.parse(query)[0][0]
#     py.test.raises(UnificationFailed, e.run_query_in_current, term)


# Path: prolog/interpreter/test/test_strictly_identical_or_not_unifiable.py
import py
from prolog.interpreter.test.tool import assert_true, assert_false


# sionu ~=~ structural identical or not unifiable
def test_basic_sionu():
    assert_false("?=(X, Y).")
    assert_true("?=(X, X).")
    assert_true("?=(1, 1).")
    assert_true("?=(1, 2).")
    assert_false("?=(X, 1).")

    assert_false("?=([X, Y], [X, X]).")