mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-09 10:20:38 +00:00
Add integer parsing test
This commit is contained in:
parent
ae79b31f3d
commit
4232c7b14e
4
integer_format_input.txt
Normal file
4
integer_format_input.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
start spider,spider,spider,spider,spider,snake,snake,snake,snake,snake,tiger,tiger,tiger,tiger,tiger,thunderstorm,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,wood,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,plastic,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal,metal
|
||||||
|
draw
|
||||||
|
rollD+04 +000004
|
||||||
|
quit
|
3
integer_format_output.txt
Normal file
3
integer_format_output.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
OK
|
||||||
|
spider
|
||||||
|
survived
|
@ -59,6 +59,11 @@ class MainTest {
|
|||||||
cmpInOut("testcoverage_input.txt", "testcoverage_output.txt");
|
cmpInOut("testcoverage_input.txt", "testcoverage_output.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void integerFormat() throws IOException {
|
||||||
|
cmpInOut("integer_format_input.txt", "integer_format_output.txt");
|
||||||
|
}
|
||||||
|
|
||||||
private void cmpInOut(String in, String out) throws IOException {
|
private void cmpInOut(String in, String out) throws IOException {
|
||||||
System.setIn(new ByteArrayInputStream(readFile(in)));
|
System.setIn(new ByteArrayInputStream(readFile(in)));
|
||||||
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
||||||
|
Loading…
Reference in New Issue
Block a user