From 9e29dd5678d463426d224ad50014a37b04ff34cc Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 4 Oct 2021 23:47:22 +0200 Subject: Implemented Funge-98 IO procedures --- tests/defaultIO.nim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/defaultIO.nim (limited to 'tests') diff --git a/tests/defaultIO.nim b/tests/defaultIO.nim new file mode 100644 index 0000000..2de2330 --- /dev/null +++ b/tests/defaultIO.nim @@ -0,0 +1,25 @@ +discard """ + input: "ab1234cd12f" + output: ''' +[Suite] defaultIO +gh789 + ''' +""" + +import unittest + +include ../src/defaultIO + +suite "defaultIO": + test "defaultCharacterInput": + check defaultCharacterInput() == 'a'.int + check defaultCharacterInput() == 'b'.int + check defaultCharacterInput() == '1'.int + test "defaultDecimalInput": + check defaultDecimalInput() == 234 + check defaultCharacterInput() == 'c'.int + test "defaultCharacterOutput": + defaultCharacterOutput('g'.int) + defaultCharacterOutput('h'.int) + test "defaultDecimalOutput": + defaultDecimalOutput(789) -- cgit v1.2.3