diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-12-18 09:29:36 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 16:29:36 +0100 |
commit | 78acf1becb20a26637d0ac03bd8fcc6296aaa0f8 (patch) | |
tree | b54ae90c308a5257eb6361716c07c5378f4f41ef /tests | |
parent | 90dbb6f3fbab684afad729903ff322a9792e1706 (diff) | |
download | Nim-78acf1becb20a26637d0ac03bd8fcc6296aaa0f8.tar.gz |
fix cmpIgnoreStyle bug (#16392)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/ttypeinfo.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/stdlib/ttypeinfo.nim b/tests/stdlib/ttypeinfo.nim index 3155a0f88..fc0bd3e53 100644 --- a/tests/stdlib/ttypeinfo.nim +++ b/tests/stdlib/ttypeinfo.nim @@ -58,3 +58,14 @@ block: for i in 0 .. m.len-1: for j in 0 .. m[i].len-1: doAssert getString(m[i][j]) == myArr[i][j] + +block: + type + Test = enum + Hello, he_llo + + var x = hello + var y = x.toAny + + doAssert getEnumOrdinal(y, "Hello") == 0 + doAssert getEnumOrdinal(y, "hello") == 1 |