# 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
#coding=utf-8


def test_strings():
    assert_true('X = "abc", X = [97, 98, 99].')
    assert_true('X = "", X = [].')
    assert_true('X = [97], X = "a".')
    assert_true('X = [97], X = Y, Y = "a".')

# 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_string.py
import py
from prolog.interpreter.test.tool import assert_true, assert_false

#coding=utf-8


def test_strings():
    assert_true('X = "abc", X = [97, 98, 99].')
    assert_true('X = "", X = [].')
    assert_true('X = [97], X = "a".')
    assert_true('X = [97], X = Y, Y = "a".')

    assert_false('X = "a", X = \'a\'.')