Archived
1
0
Fork 0

Implemented Funge-98 IO procedures

This commit is contained in:
Julien Dessaux 2021-10-04 23:47:22 +02:00
parent 7c24db334e
commit 9e29dd5678
2 changed files with 65 additions and 0 deletions

25
tests/defaultIO.nim Normal file
View file

@ -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)