| 1 | type ReleaseTarget = string |
| 2 | |
| 3 | const production = ReleaseTarget('production') |
| 4 | const testing = ReleaseTarget('testing') |
| 5 | |
| 6 | fn test_alias_string_match() { |
| 7 | target := match ReleaseTarget('testing') { |
| 8 | production { production } |
| 9 | testing { testing } |
| 10 | else { panic(error('Invalid target')) } |
| 11 | } |
| 12 | |
| 13 | assert target == ReleaseTarget('testing') |
| 14 | assert target == testing |
| 15 | } |
| 16 |