Add test cases.

This commit is contained in:
tim.schubert@tu-bs.de 2016-10-30 00:15:19 +02:00
parent 04d5638c02
commit 877d4e48d6
3 changed files with 22 additions and 0 deletions

10
tests/cases Normal file
View file

@ -0,0 +1,10 @@
57005
1101111010101101b
0xDEAD
57005+28502
1101111010101101b-110111101010110b
0xDEAD*0x6F56
57005/28502
0xDEAD*4294967295
0x6F56-0xDEAD
0xDEAD/0

10
tests/expected Normal file
View file

@ -0,0 +1,10 @@
57005 0xDEAD 1101111010101101b
57005 0xDEAD 1101111010101101b
57005 0xDEAD 1101111010101101b
85507 0x14E03 10100111000000011b
28503 0x6F57 110111101010111b
1624756510 0x60D7D11E 1100000110101111101000100011110b
2 0x2 10b
calc: failed to calculate
calc: failed to calculate
calc: failed to calculate

2
tests/tests.sh Normal file
View file

@ -0,0 +1,2 @@
cat cases | ../netcalc -c > results
diff expected results