This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
2022-08-24 05:22:24 +00:00
|
|
|
package parser
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestEnum (test *testing.T) {
|
2022-09-05 18:52:37 +00:00
|
|
|
checkTree ("../tests/parser/enum", false,
|
2022-08-24 05:22:24 +00:00
|
|
|
`:arf
|
|
|
|
---
|
2022-09-05 15:35:32 +00:00
|
|
|
enum ro AffrontToGod:Int:4
|
2022-09-27 22:23:23 +00:00
|
|
|
- bird0 (28394 9328 398 9)
|
|
|
|
- bird1 (23 932832 398 2349)
|
|
|
|
- bird2 (1 2 3 4)
|
2022-08-24 05:22:24 +00:00
|
|
|
enum ro NamedColor:U32
|
2022-09-27 21:05:13 +00:00
|
|
|
- red 16711680
|
|
|
|
- green 65280
|
|
|
|
- blue 255
|
|
|
|
enum ro ThisIsTerrible:Vector
|
2022-09-27 22:23:23 +00:00
|
|
|
- up (0 -1)
|
|
|
|
- down (0 1)
|
|
|
|
- left (-1 0)
|
|
|
|
- right (1 0)
|
2022-08-24 05:22:24 +00:00
|
|
|
enum ro Weekday:Int
|
2022-09-17 04:58:08 +00:00
|
|
|
- sunday
|
|
|
|
- monday
|
|
|
|
- tuesday
|
|
|
|
- wednesday
|
|
|
|
- thursday
|
|
|
|
- friday
|
|
|
|
- saturday
|
2022-08-24 05:22:24 +00:00
|
|
|
`, test)
|
|
|
|
}
|