aboutsummaryrefslogtreecommitdiff
path: root/tests/defaultIO.nim
blob: 2de233086a4b222e87a3201fbaebb5c882c33bd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)