diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2021-05-09 19:37:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-09 19:37:24 +0200 |
| commit | 84d844bd4ad9320d00ea5f025a9ca44bf74c6ee7 (patch) | |
| tree | 87c7e9d164e1da62c5cf4a3dff0cc9dea3f6e1d1 /src/testing | |
| parent | 87d4464e91f8b5784ba20e6ef78c818092afb9a9 (diff) | |
| parent | 9c2090e0395d68bb9a89cfd3f69f863375a27f54 (diff) | |
Merge pull request #39 from DanielGavin/procedure-arguments
begun argument underlining
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/testing.odin | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/testing/testing.odin b/src/testing/testing.odin index e74fb0e..ebaf4fc 100644 --- a/src/testing/testing.odin +++ b/src/testing/testing.odin @@ -73,6 +73,7 @@ setup :: proc(src: ^Source) { There is a lot code here that is used in the real code, then i'd like to see. */ + index.indexer.static_index = index.make_memory_index(index.make_symbol_collection(context.allocator, &common.config)); index.indexer.dynamic_index = index.make_memory_index(index.make_symbol_collection(context.allocator, &common.config)); for src_pkg in src.packages { @@ -108,7 +109,7 @@ setup :: proc(src: ^Source) { return; } - if ret := index.collect_symbols(&index.indexer.dynamic_index.collection, file, uri.uri); ret != .None { + if ret := index.collect_symbols(&index.indexer.static_index.collection, file, uri.uri); ret != .None { return; } } @@ -145,6 +146,16 @@ expect_signature_labels :: proc(t: ^testing.T, src: ^Source, expect_labels: []st } +expect_signature_parameter_position :: proc(t: ^testing.T, src: ^Source, position: int) { + setup(src); + + help, ok := server.get_signature_information(src.document, src.position); + + if help.activeParameter != position { + testing.errorf(t, "expected parameter position %v, but received %v", position, help.activeParameter); + } +} + expect_completion_details :: proc(t: ^testing.T, src: ^Source, trigger_character: string, expect_details: []string) { setup(src); |