Archived
1
0
Fork 0
This repository has been archived on 2025-03-10. You can view files and clone it, but cannot push or open issues or pull requests.
nimfunge98/tests/defaultIO.nim

29 lines
706 B
Nim

discard """
input: "ab1234cd12f"
output: '''
[Suite] defaultIO
[OK] defaultCharacterInput
[OK] defaultDecimalInput
gh [OK] defaultCharacterOutput
789 [OK] defaultDecimalOutput
'''
"""
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)