diff options
author | enurlyx <enurlyx@gmail.com> | 2014-06-17 21:42:16 +0200 |
---|---|---|
committer | enurlyx <enurlyx@gmail.com> | 2014-06-17 21:42:16 +0200 |
commit | 2940aa5ee200354f2bfd06eddbe51a16a7397d3d (patch) | |
tree | e4b79a7f815020191938b0424a1fe5b532897668 /compiler/c2nim/tests | |
parent | bd3f6b51d0be7e8cc360e32b778086c5326a8eca (diff) | |
download | Nim-2940aa5ee200354f2bfd06eddbe51a16a7397d3d.tar.gz |
Made the code more robust and detect nkPrefix as number (-1 or +4) for enum sorting. Added also a new test for enums.
Diffstat (limited to 'compiler/c2nim/tests')
-rw-r--r-- | compiler/c2nim/tests/enum.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/c2nim/tests/enum.h b/compiler/c2nim/tests/enum.h index c9c055e14..16bc59058 100644 --- a/compiler/c2nim/tests/enum.h +++ b/compiler/c2nim/tests/enum.h @@ -24,4 +24,17 @@ typedef enum food bun = 0x04, cucumber = 2, chocolate = 6 +}; + +typedef enum numbers +{ + one = 1, + two, + nten = - 10, + nnine, + four = 4, + three = + 3, + positivenine = + 9, + nfour = - 4, + negativeten = -10 }; \ No newline at end of file |