Skip to content

Commit 2bc344a

Browse files
committed
sp streng over DS
1 parent 1458e81 commit 2bc344a

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tests/schuifpuzzelTest.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@
44
from checkpy.entities import exception
55

66
from _basics_no_listcomp import *
7+
from _static_analysis import *
78

89
@t.passed(doctest_ok)
10+
@t.test(9)
11+
def checks_content(test):
12+
"""datastructuur `list[list[int]]` is toegepast"""
13+
if not has_string("Board = list[list[int]]"):
14+
return False, "Board = list[list[int]] niet gevonden"
15+
if not has_string("def is_won(board: Board) -> bool:"):
16+
return False, "functie `is_won` moet een `board: Board`-parameter hebben"
17+
if not has_string("def print_board(board: Board) -> None:"):
18+
return False, "functie `print_board` moet een `board: Board`-parameter hebben"
19+
if not has_string("def create_board() -> Board:"):
20+
return False, "functie `create_board` moet een `Board` teruggeven"
21+
22+
@t.passed(checks_content)
923
@t.test(10)
1024
def checks_set_board(test):
1125
"""functie `create_board` werkt correct"""
@@ -22,7 +36,7 @@ def testMethod():
2236
return False
2337
test.test = testMethod
2438

25-
@t.passed(doctest_ok)
39+
@t.passed(checks_content)
2640
@t.test(20)
2741
def checks_is_won(test):
2842
"""functie `is_won` werkt correct"""
@@ -39,7 +53,7 @@ def testMethod():
3953
return False
4054
test.test = testMethod
4155

42-
@t.passed(doctest_ok)
56+
@t.passed(checks_content)
4357
@t.test(30)
4458
def checks_move_tile(test):
4559
"""functie `move_tile` werkt correct"""
@@ -79,7 +93,7 @@ def testMethod():
7993
return True
8094
test.test = testMethod
8195

82-
@t.passed(doctest_ok)
96+
@t.passed(checks_content)
8397
@t.test(40)
8498
def check_win(test):
8599
"""spel werkt en is uit te spelen"""

0 commit comments

Comments
 (0)