zig/test/behavior/bugs/3384.zig
Andrew Kelley 4307436b99 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.
2021-04-29 15:54:04 -07:00

12 lines
417 B
Zig

const std = @import("std");
const expect = std.testing.expect;
test "resolve array slice using builtin" {
expect(@hasDecl(@This(), "std") == true);
expect(@hasDecl(@This(), "std"[0..0]) == false);
expect(@hasDecl(@This(), "std"[0..1]) == false);
expect(@hasDecl(@This(), "std"[0..2]) == false);
expect(@hasDecl(@This(), "std"[0..3]) == true);
expect(@hasDecl(@This(), "std"[0..]) == true);
}