diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-29 15:54:04 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-29 15:54:04 -0700 |
| commit | 4307436b9945f814ff5731981df1d19febf3ba0a (patch) | |
| tree | efaaec94a41d632d45f255d464d9787eb02c4c9b /test/behavior/pub_enum.zig | |
| parent | 5a02c938dafdf2bb11b2350b6ad3161ef93744f0 (diff) | |
| download | zig-4307436b9945f814ff5731981df1d19febf3ba0a.tar.gz zig-4307436b9945f814ff5731981df1d19febf3ba0a.zip | |
move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
Diffstat (limited to 'test/behavior/pub_enum.zig')
| -rw-r--r-- | test/behavior/pub_enum.zig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/behavior/pub_enum.zig b/test/behavior/pub_enum.zig new file mode 100644 index 0000000000..0613df94d9 --- /dev/null +++ b/test/behavior/pub_enum.zig @@ -0,0 +1,13 @@ +const other = @import("pub_enum/other.zig"); +const expect = @import("std").testing.expect; + +test "pub enum" { + pubEnumTest(other.APubEnum.Two); +} +fn pubEnumTest(foo: other.APubEnum) void { + expect(foo == other.APubEnum.Two); +} + +test "cast with imported symbol" { + expect(@as(other.size_t, 42) == 42); +} |
