Commits

Edd Barrett committed d765c5c

Add tests for last/2.

Comments (0)

Files changed (1)

prolog/prolog_modules/test/test_list.py

     assert_true('length(List, 6), is_list(List), length(List, 6).', e)
     assert_false('length(X, -1).', e)
     assert_false('length(a, Y).', e)
+
+def test_last():
+    assert_true('last([1,2,3], 3).', e)
+    assert_true('last([666], 666).', e)
+    assert_false('last([], X).', e)