new tester; all tests categorized

This commit is contained in:
Araq
2014-01-13 02:10:03 +01:00
parent 51ee524109
commit 20b5f31c03
481 changed files with 794 additions and 2506 deletions

View File

@@ -0,0 +1,23 @@
discard """
file: "tarraycons.nim"
output: "6"
"""
type
TEnum = enum
eA, eB, eC, eD, eE, eF
const
myMapping: array[TEnum, array[0..1, int]] = [
eA: [1, 2],
eB: [3, 4],
[5, 6],
eD: [0: 8, 1: 9],
eE: [0: 8, 9],
eF: [2, 1: 9]
]
echo myMapping[eC][1]