From bf87cb80bd98ac2e79b3899db8502d249b2809b4 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 11 Apr 2016 08:58:22 +0200 Subject: Prolog: add a test case for mirrorBT/2 --- prolog/problems/trees/mirrorbt_2/common.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'prolog/problems') diff --git a/prolog/problems/trees/mirrorbt_2/common.py b/prolog/problems/trees/mirrorbt_2/common.py index ed9162c..7198cec 100644 --- a/prolog/problems/trees/mirrorbt_2/common.py +++ b/prolog/problems/trees/mirrorbt_2/common.py @@ -20,6 +20,8 @@ mirrorBT(b(L, X, R), b(NewR, X, NewL)) :- test_cases = [ ('mirrorBT(nil, X)', [{'X': 'nil'}]), + ('\+ mirrorBT(42, 42)', + [{}]), ('mirrorBT(b(nil,q,nil), X), X == b(nil,q,nil)', [{}]), ('mirrorBT(b(b(nil,a,nil),d,b(nil,c,nil)), X), X == b(b(nil,c,nil),d,b(nil,a,nil))', -- cgit v1.2.1