Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ramsesoriginal/8f5ecd2d1a97774bfbd048650be3cd0c to your computer and use it in GitHub Desktop.
Save ramsesoriginal/8f5ecd2d1a97774bfbd048650be3cd0c to your computer and use it in GitHub Desktop.
PA07 Testaufrufe
PPUPP
PPPPP
PPUPP
UPPPUPPPUP
PUUPPPUUUP
PPPUUUPPPP
UUPPPPPUUP
'''testStart
testCategory Tests aus der Angabe
testName Weg Findbar
maxtime 3
expectedResult 11
call abstand((0, 9), (2, 2))
testName Weg Nicht Findbar
maxtime 3
expectedResult -1
call abstand((0, 9), (0, 7))
testCategory Tests auf kleinem Feld
testName Diagonal Runter
maxtime 3
expectedResult 6
call abstand((0, 0), (2, 4), "klein.dat")
testName Diagonal Rauf
maxtime 3
expectedResult 6
call abstand((2, 4), (0, 0), "klein.dat")
testName Ziel = Start
maxtime 3
expectedResult 0
call abstand((1, 2), (1, 2), "klein.dat")
endTest'''
print("\n Tests aus der Angabe")
print(" Weg Findbar")
print("erwartet: "," 11")
print( abstand((0, 9), (2, 2)))
print(" Weg Nicht Findbar")
print("erwartet: "," -1")
print( abstand((0, 9), (0, 7)))
print("\n Tests auf kleinem Feld")
print(" Diagonal Runter")
print("erwartet: "," 6")
print( abstand((0, 0), (2, 4), "klein.dat"))
print(" Diagonal Rauf")
print("erwartet: "," 6")
print( abstand((2, 4), (0, 0), "klein.dat"))
print(" Ziel = Start")
print("erwartet: "," 0")
print( abstand((1, 2), (1, 2), "klein.dat"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment