Commits

Edd Barrett committed ecc1e47

Test min_member/2 and max_member/2 work on empty lists.

  • Participants
  • Parent commits 0029d6c

Comments (0)

Files changed (1)

prolog/prolog_modules/test/test_list.py

 def test_min_member_cmp_string_compund():
     assert_true('min_member("yeehaw", ["yeehaw", flibble(x, b, b), flibble(y, z)]).', e)
 
+def test_min_member_empty():
+    assert_false('min_member(X, []).', e)
+
 def test_max_member_var():
     assert_true("max_member(X, [TEA,UNIVERSE, SHIRT]), " + \
             "X @>= TEA, X @>= UNIVERSE, X @>= SHIRT.", e)
 
 def test_max_member_cmp_string_compund():
     assert_true('max_member(flibble(x, b, b), ["yeehaw", flibble(x, b, b), flibble(y, z)]).', e)
+
+def test_max_member_empty():
+    assert_false('max_member(X, []).', e)