summaryrefslogtreecommitdiff
path: root/prolog/problems/family_relations/grandparent_2
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/family_relations/grandparent_2')
-rw-r--r--prolog/problems/family_relations/grandparent_2/common.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/prolog/problems/family_relations/grandparent_2/common.py b/prolog/problems/family_relations/grandparent_2/common.py
index e9df06b..fec7734 100644
--- a/prolog/problems/family_relations/grandparent_2/common.py
+++ b/prolog/problems/family_relations/grandparent_2/common.py
@@ -31,7 +31,16 @@ hint_type = {
}
test_cases = [
- # TODO
+ ('grandparent(X, _)',
+ [{'X': 'aleksandr'}, {'X': 'ana'}, {'X': 'andrew'}, {'X': 'estelle'}, {'X': 'frank'},
+ {'X': 'helen'}, {'X': 'jill'}, {'X': 'margaret'}, {'X': 'morty'}, {'X': 'patricia'},
+ {'X': 'sally'}, {'X': 'thomas'}, {'X': 'tina'}, {'X': 'william'}]),
+ ('grandparent(_, X)',
+ [{'X': 'andrew'}, {'X': 'anna'}, {'X': 'daniela'}, {'X': 'joanne'}, {'X': 'john'},
+ {'X': 'kramer'}, {'X': 'luana'}, {'X': 'melanie'}, {'X': 'michael'}, {'X': 'michelle'},
+ {'X': 'patricia'}, {'X': 'steve'}, {'X': 'susan'}, {'X': 'vanessa'}]),
+ ('grandparent(tina, X)',
+ [{'X': 'vanessa'}, {'X': 'patricia'}]),
]
def test(program, solved_problems):