Merge pull request #1215 from Techatrix/refactor-doc-scope
Refactor document scope generation
This commit is contained in:
@@ -300,6 +300,16 @@ test "completion - enum" {
|
||||
.{ .label = "alpha", .kind = .Enum },
|
||||
.{ .label = "beta", .kind = .Enum },
|
||||
});
|
||||
try testCompletion(
|
||||
\\const E = enum {
|
||||
\\ alpha,
|
||||
\\ beta,
|
||||
\\};
|
||||
\\const foo: E = .<cursor>
|
||||
, &.{
|
||||
.{ .label = "alpha", .kind = .Enum },
|
||||
.{ .label = "beta", .kind = .Enum },
|
||||
});
|
||||
}
|
||||
|
||||
test "completion - error union" {
|
||||
@@ -463,6 +473,16 @@ test "completion - usingnamespace" {
|
||||
// TODO private should not be visible
|
||||
.{ .label = "private", .kind = .Function, .detail = "fn private() !void" },
|
||||
});
|
||||
try testCompletion(
|
||||
\\const S1 = struct {
|
||||
\\ usingnamespace struct {
|
||||
\\ pub fn inner() void {}
|
||||
\\ };
|
||||
\\};
|
||||
\\const foo = S1.<cursor>
|
||||
, &.{
|
||||
.{ .label = "inner", .kind = .Function, .detail = "fn inner() void" },
|
||||
});
|
||||
}
|
||||
|
||||
test "completion - block" {
|
||||
|
||||
Reference in New Issue
Block a user