2019-10-10 16:55:09 +08:00
|
|
|
const std = @import("std");
|
|
|
|
const expect = std.testing.expect;
|
|
|
|
|
|
|
|
test "resolve array slice using builtin" {
|
2021-05-05 02:23:22 +08:00
|
|
|
try expect(@hasDecl(@This(), "std") == true);
|
|
|
|
try expect(@hasDecl(@This(), "std"[0..0]) == false);
|
|
|
|
try expect(@hasDecl(@This(), "std"[0..1]) == false);
|
|
|
|
try expect(@hasDecl(@This(), "std"[0..2]) == false);
|
|
|
|
try expect(@hasDecl(@This(), "std"[0..3]) == true);
|
|
|
|
try expect(@hasDecl(@This(), "std"[0..]) == true);
|
2019-10-10 16:55:09 +08:00
|
|
|
}
|