Skip to content
Snippets Groups Projects
Commit 2342f1e0 authored by zalavari's avatar zalavari
Browse files

Tesztek verziókövetés alá vetése.

Új testere.ps1 szkriptfájlt adtam hozzá, amiben az eredetihez képest
módosítottam a *.class fájlok elérési útját.
parent 20631ce5
Branches
Tags
No related merge requests found
parsemap 4 6
wwwwww
wmsmmw
wmkmmw
wwwwww
setswitch f_1_2 f_2_2
worker w1 5 f_1_1
crate c1 f_2_2
step w1 right
stat f_1_1
stat f_1_2
stat w1
\ No newline at end of file
neighborUp: f_0_1
neighborRight: f_1_2
neighborDown: f_2_1
neighborLeft: f_1_0
moveable: null
fluid: no fluid
neighborUp: f_0_2
neighborRight: f_1_3
neighborDown: f_2_2
neighborLeft: f_1_1
moveable: null
fluid: no fluid
myField: f_1_2
points: 0
force: 0.0
alive: false
\ No newline at end of file
parsemap 4 6
wwwwww
wmsmmw
wmkmmw
wwwwww
setswitch f_1_2 f_2_2
worker w1 5 f_1_1
step w1 right
stat f_1_1
stat f_1_2
stat w1
\ No newline at end of file
neighborUp: f_0_1
neighborRight: f_1_2
neighborDown: f_2_1
neighborLeft: f_1_0
moveable: null
fluid: no fluid
neighborUp: f_0_2
neighborRight: f_1_3
neighborDown: f_2_2
neighborLeft: f_1_1
moveable: w1
fluid: no fluid
myField: f_1_2
points: 0
force: 5.0
alive: true
\ No newline at end of file
parsemap 4 6
wwwwww
wmmmmw
wmmmmw
wwwwww
worker w1 5 f_1_3
crate c1 f_1_4
step w1 right
stat f_1_3
stat f_1_4
stat w1
\ No newline at end of file
neighborUp: f_0_3
neighborRight: f_1_4
neighborDown: f_2_3
neighborLeft: f_1_2
moveable: w1
fluid: no fluid
neighborUp: f_0_4
neighborRight: f_1_5
neighborDown: f_2_4
neighborLeft: f_1_3
moveable: c1
fluid: no fluid
myField: f_1_3
points: 0
force: 5.0
alive: true
\ No newline at end of file
function test([string]$testfile, [string]$expectedfile) {
$expResult = cat $expectedfile
$input = cat $testfile
$output = echo $input | java -cp .\bin\ killer_sokoban.Main
$diff = compare $output $expResult
if ($diff.Length -eq 0) {
echo "Test with test file $testfile passed."
} else {
echo "Test with test file $testfile FAILED!"
echo "Got:"
echo "-------------------------------------"
echo $output
echo "Expected:"
echo "-------------------------------------"
echo $expResult
}
}
function testAll() {
$tfiles = dir -fi "*.in" -Name
foreach ($item in $tfiles) {
$temp = $item.Substring(0, $item.LastIndexOf('.'))
test $item "$temp.out"
}
}
#main
if ($args.Count -eq 0) {
testAll
} elseif($args.Count -eq 2) {
test $args[0] $args[1]
} else {
echo "Wrong number of arguments!"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment