summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-06-11 11:46:14 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-06-11 11:46:14 +0200
commit70d5bcf8eca474440020c31239cd827cf3bb3415 (patch)
tree3fec51ed6f3257ad73b971e98dcb7c6b5e1f68fc /src/testing
parenteda3110541a5a9f6f5e3b9428139f5d060e6a3ae (diff)
More reference work
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing.odin19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/testing/testing.odin b/src/testing/testing.odin
index 0335cce..c8ccc17 100644
--- a/src/testing/testing.odin
+++ b/src/testing/testing.odin
@@ -17,12 +17,12 @@ Package :: struct {
}
Source :: struct {
- main: string,
- packages: [] Package,
- document: ^common.Document,
- collections: map[string]string,
- config: common.Config,
- position: common.Position,
+ main: string,
+ packages: [] Package,
+ document: ^common.Document,
+ collections: map[string]string,
+ config: common.Config,
+ position: common.Position,
}
@(private)
@@ -89,9 +89,9 @@ setup :: proc(src: ^Source) {
dir := filepath.base(filepath.dir(fullpath, context.temp_allocator));
pkg := new(ast.Package);
- pkg.kind = .Normal;
+ pkg.kind = .Normal;
pkg.fullpath = fullpath;
- pkg.name = dir;
+ pkg.name = dir;
if dir == "runtime" {
pkg.kind = .Runtime;
@@ -199,7 +199,6 @@ expect_completion_labels :: proc(t: ^testing.T, src: ^Source, trigger_character:
testing.errorf(t, "Expected completion detail %v, but received %v", expect_labels[i], completion_list.items);
}
}
-
}
expect_completion_details :: proc(t: ^testing.T, src: ^Source, trigger_character: string, expect_details: []string) {
@@ -235,7 +234,6 @@ expect_completion_details :: proc(t: ^testing.T, src: ^Source, trigger_character
testing.errorf(t, "Expected completion label %v, but received %v", expect_details[i], completion_list.items);
}
}
-
}
expect_hover :: proc(t: ^testing.T, src: ^Source, expect_hover_string: string) {
@@ -255,7 +253,6 @@ expect_hover :: proc(t: ^testing.T, src: ^Source, expect_hover_string: string) {
if !strings.contains(hover.contents.value, expect_hover_string) {
testing.errorf(t, "Expected hover string %v, but received %v", expect_hover_string, hover.contents.value);
}
-
}
expect_definition_locations :: proc(t: ^testing.T, src: ^Source, expect_locations: []common.Location) {