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

70 lines
648 B
Go
Raw Normal View History

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