Skip to content

Commit

Permalink
closes #12589; add testcase (#20769)
Browse files Browse the repository at this point in the history
* fixes #12589; add testcase

* fixes i386

* i386
  • Loading branch information
ringabout authored Nov 6, 2022
1 parent 3c2c728 commit 93b085a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/enum/tenum.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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"

0 comments on commit 93b085a

Please sign in to comment.