Commit Graph

13 Commits

Author SHA1 Message Date
ringabout
c91b33aaba re-enable tests (#23591) 2024-05-10 16:17:58 +02:00
ringabout
42486e1b2f unordered enum for better interoperability with C (#23585)
ref https://forum.nim-lang.org/t/11564
```nim
block: # unordered enum
  block:
    type
      unordered_enum = enum
        a = 1
        b = 0

    doAssert (ord(a), ord(b)) == (1, 0)

  block:
    type
      unordered_enum = enum
        a = 1
        b = 0
        c

    doAssert (ord(a), ord(b), ord(c)) == (1, 0, 2)

  block:
    type
      unordered_enum = enum
        a = 100
        b
        c = 50
        d

    doAssert (ord(a), ord(b), ord(c), ord(d)) == (100, 101, 50, 51)

  block:
    type
      unordered_enum = enum
        a = 7
        b = 6
        c = 5
        d

    doAssert (ord(a), ord(b), ord(c), ord(d)) == (7, 6, 5, 8)
```
2024-05-10 10:32:07 +02:00
ringabout
8cf5643621 fixes #21280; Enum with int64.high() value crashes compiler (#21285)
* fixes #21280; Enum with int64.high() value crashes compiler

* Update tests/enum/tenum.nim

* Update tests/enum/tenum.nim

* fixes tests

* Update tests/enum/tenum.nim

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2023-05-06 21:38:17 +02:00
ringabout
51f410e1d5 megatest now checks refc too (#21341)
* megatest now checks refc too

* fixes refc
2023-02-09 16:14:39 -05:00
ringabout
93b085a57a closes #12589; add testcase (#20769)
* fixes #12589; add testcase

* fixes i386

* i386
2022-11-06 11:46:51 +01:00
Timothee Cour
ef121f3b99 followup #17876: remove annoying enum name clashes in tests/enum/tenum.nim (#18291) 2021-06-17 16:19:16 -07:00
Timothee Cour
840e13deb7 type with same name in different scope now works (#17710)
* type with same name in different scope now works
* fix tests/enum/tenum.nim which was wrong because it was affected by this bug
2021-04-14 08:50:15 +02:00
cooldome
f8cac6bbbc fix #15752 (#15754) 2020-10-28 00:09:26 +01:00
Miran
e7878c0d08 add tests for recently closed issues (#10722) 2019-02-23 10:41:35 +01:00
Miran
3c9fcc4c30 Merge tests into a larger file (part 2 of ∞) (#9335)
* merge controlflow tests

* merge distinct tests

* merge enum tests

* merge fields tests

* merge implicit tests

* merge iter issues tests
2018-10-13 14:58:31 +02:00
Yuriy Glukhov
f46d40cb37 Added a test case 2016-05-18 13:51:07 +03:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
Araq
20b5f31c03 new tester; all tests categorized 2014-01-13 02:10:03 +01:00