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.
arf/parser/enum_test.go

66 lines
569 B
Go
Raw Normal View History

package parser
import "testing"
func TestEnum (test *testing.T) {
2022-09-05 12:52:37 -06:00
checkTree ("../tests/parser/enum", false,
`:arf
---
enum ro AffrontToGod:Int:4
2022-09-27 15:05:13 -06:00
- bird0
)
2022-09-17 00:11:12 -06:00
28394
9328
398
9
2022-09-27 15:05:13 -06:00
)
- bird1
(
2022-09-17 00:11:12 -06:00
23
932832
398
2022-09-17 00:11:12 -06:00
2349
2022-09-27 15:05:13 -06:00
)
- bird2
(
2022-09-17 00:11:12 -06:00
1
2
3
2022-09-17 00:11:12 -06:00
4
2022-09-27 15:05:13 -06:00
)
enum ro NamedColor:U32
2022-09-27 15:05:13 -06:00
- red 16711680
- green 65280
- blue 255
enum ro ThisIsTerrible:Vector
- up
2022-09-17 00:07:50 -06:00
(
2022-09-27 15:05:13 -06:00
0
-1
2022-09-17 00:07:50 -06:00
)
2022-09-27 15:05:13 -06:00
- down
2022-09-17 00:07:50 -06:00
(
2022-09-27 15:05:13 -06:00
0
1
2022-09-17 00:11:12 -06:00
)
2022-09-27 15:05:13 -06:00
- left
2022-09-17 00:07:50 -06:00
(
2022-09-27 15:05:13 -06:00
-1
0
2022-09-17 00:07:50 -06:00
)
2022-09-27 15:05:13 -06:00
- right
2022-09-17 00:07:50 -06:00
(
2022-09-27 15:05:13 -06:00
1
0
2022-09-17 00:07:50 -06:00
)
enum ro Weekday:Int
2022-09-16 22:58:08 -06:00
- sunday
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
`, test)
}