diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-11-06 18:46:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-06 11:46:51 +0100 |
commit | 93b085a57ad28c71056dd3da6c4daa56ef4713c4 (patch) | |
tree | b18815ee43dadf9f00166b17141ce4f4da0bdfd3 | |
parent | 3c2c728eb62f7fea19ace6ee8caf2b8ad6d7dd72 (diff) | |
download | Nim-93b085a57ad28c71056dd3da6c4daa56ef4713c4.tar.gz |
closes #12589; add testcase (#20769)
* fixes #12589; add testcase * fixes i386 * i386
-rw-r--r-- | tests/enum/tenum.nim | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/enum/tenum.nim b/tests/enum/tenum.nim index 37383890c..b11b02ec6 100644 --- a/tests/enum/tenum.nim +++ b/tests/enum/tenum.nim @@ -155,11 +155,23 @@ block nonzero: # bug #6959 C let slice = SomeEnum.low..SomeEnum.high -block size_one_byte: #issue 15752 +block size_one_byte: # bug #15752 type Flag = enum Disabled = 0x00 Enabled = 0xFF static: - assert 1 == sizeof(Flag) \ No newline at end of file + assert 1 == sizeof(Flag) + +block: # bug #12589 + when not defined(i386): + type + OGRwkbGeometryType {.size: sizeof(cuint).} = enum + wkbPoint25D = 0x80000001.cuint, wkbLineString25D = 0x80000002, + wkbPolygon25D = 0x80000003 + + proc typ(): OGRwkbGeometryType = + return wkbPoint25D + + doAssert $typ() == "wkbPoint25D" |