From 408a95cd1bd764e806d3431baba1a51a90d4273e Mon Sep 17 00:00:00 2001 From: Adam Welc Date: Wed, 3 Jul 2024 17:14:26 -0700 Subject: [PATCH] [move-ide] Dot completion enhancements and fixes (#18522) ## Description This PR fixes dot-completion for macros: - previously when inserting method name at the callsite we would not include the `!` at the end of macro function name which could be annoying - macro parameter names (starting with `$`) did not work well with LSP snippet syntax resulting in macro parameter names not being displayed as part of the inserted snippet The PR also enhances support for macro dot-completion by expanding lambda parameters into their own snippets with placeholders for all parameters and the return value. ![image](https://github.com/MystenLabs/sui/assets/1724397/c53f83d6-5d7e-46c4-8c3c-061208526791) ![image](https://github.com/MystenLabs/sui/assets/1724397/f7917988-e052-4271-a814-403e3ee7fc53) Finally, this PR extends IDE testing framework with dot-completion tests and unifies test specifications to use 1-based (instead of 0-based) line numbers in the input to simplify addition of new tests. ## Test plan All new and existing tests must pass. --- .../move-analyzer/editors/code/package.json | 2 +- .../crates/move-analyzer/src/completion.rs | 289 +++++------------- .../tests/completion/sources/macro_dot.move | 11 + .../crates/move-analyzer/tests/consts.exp | 34 +-- .../crates/move-analyzer/tests/consts.ide | 34 +-- .../crates/move-analyzer/tests/docstring.exp | 32 +- .../crates/move-analyzer/tests/docstring.ide | 32 +- .../crates/move-analyzer/tests/dot_calls.exp | 44 +-- .../crates/move-analyzer/tests/dot_calls.ide | 44 +-- .../move-analyzer/tests/dot_completion.exp | 55 ++++ .../move-analyzer/tests/dot_completion.ide | 40 +++ .../move/crates/move-analyzer/tests/enums.exp | 128 ++++---- .../move/crates/move-analyzer/tests/enums.ide | 128 ++++---- .../move-analyzer/tests/ide_testsuite.rs | 60 +++- .../move-analyzer/tests/implicit_uses.exp | 4 +- .../move-analyzer/tests/implicit_uses.ide | 4 +- .../crates/move-analyzer/tests/imports.exp | 26 +- .../crates/move-analyzer/tests/imports.ide | 26 +- .../crates/move-analyzer/tests/let_mut.exp | 8 +- .../crates/move-analyzer/tests/let_mut.ide | 8 +- .../crates/move-analyzer/tests/macros.exp | 68 ++--- .../crates/move-analyzer/tests/macros.ide | 68 ++--- .../crates/move-analyzer/tests/mod_access.exp | 18 +- .../crates/move-analyzer/tests/mod_access.ide | 18 +- .../move-analyzer/tests/parse_error.exp | 8 +- .../move-analyzer/tests/parse_error.ide | 8 +- .../move-analyzer/tests/parse_error_dep.exp | 4 +- .../move-analyzer/tests/parse_error_dep.ide | 4 +- .../move-analyzer/tests/partial_dot.exp | 12 +- .../move-analyzer/tests/partial_dot.ide | 12 +- .../move-analyzer/tests/partial_function.exp | 2 +- .../move-analyzer/tests/partial_function.ide | 2 +- .../move-analyzer/tests/pretype_error.exp | 2 +- .../move-analyzer/tests/pretype_error.ide | 2 +- .../move-analyzer/tests/pretype_error_dep.exp | 10 +- .../move-analyzer/tests/pretype_error_dep.ide | 10 +- .../crates/move-analyzer/tests/structs.exp | 14 +- .../crates/move-analyzer/tests/structs.ide | 14 +- .../crates/move-analyzer/tests/symbols.exp | 144 ++++----- .../crates/move-analyzer/tests/symbols.ide | 144 ++++----- 40 files changed, 797 insertions(+), 776 deletions(-) create mode 100644 external-crates/move/crates/move-analyzer/tests/completion/sources/macro_dot.move create mode 100644 external-crates/move/crates/move-analyzer/tests/dot_completion.exp create mode 100644 external-crates/move/crates/move-analyzer/tests/dot_completion.ide diff --git a/external-crates/move/crates/move-analyzer/editors/code/package.json b/external-crates/move/crates/move-analyzer/editors/code/package.json index b6bd305b0e261..788cb8d34f517 100644 --- a/external-crates/move/crates/move-analyzer/editors/code/package.json +++ b/external-crates/move/crates/move-analyzer/editors/code/package.json @@ -5,7 +5,7 @@ "publisher": "mysten", "icon": "images/move.png", "license": "Apache-2.0", - "version": "1.0.7", + "version": "1.0.8", "preview": true, "repository": { "url": "https://github.com/MystenLabs/sui.git", diff --git a/external-crates/move/crates/move-analyzer/src/completion.rs b/external-crates/move/crates/move-analyzer/src/completion.rs index 6ec181dbc420e..ddb697027fee0 100644 --- a/external-crates/move/crates/move-analyzer/src/completion.rs +++ b/external-crates/move/crates/move-analyzer/src/completion.rs @@ -6,7 +6,7 @@ use crate::{ context::Context, symbols::{ get_symbols, mod_ident_to_ide_string, ret_type_to_ide_str, type_args_to_ide_string, - type_list_to_ide_string, type_to_ide_string, DefInfo, PrecompiledPkgDeps, + type_list_to_ide_string, type_to_ide_string, DefInfo, FunType, PrecompiledPkgDeps, SymbolicatorRunner, Symbols, }, utils, @@ -21,7 +21,7 @@ use move_compiler::{ editions::Edition, expansion::ast::{ModuleIdent_, Visibility}, linters::LintLevel, - naming::ast::Type, + naming::ast::{Type, Type_}, parser::{ ast::Ability_, keywords::{BUILTINS, CONTEXTUAL_KEYWORDS, KEYWORDS, PRIMITIVE_TYPES}, @@ -236,8 +236,25 @@ fn fun_def_info( symbols.def_info(&fdef.name_loc) } -fn fun_completion_item( +fn lamda_snippet(sp!(_, ty): &Type, snippet_idx: &mut i32) -> Option { + if let Type_::Fun(vec, _) = ty { + let arg_snippets = vec + .iter() + .map(|_| { + *snippet_idx += 1; + format!("${{{snippet_idx}}}") + }) + .collect::>() + .join(", "); + *snippet_idx += 1; + return Some(format!("|{arg_snippets}| ${{{snippet_idx}}}")); + } + None +} + +fn call_completion_item( mod_ident: &ModuleIdent_, + fun_type: &FunType, method_name: &Symbol, function_name: &Symbol, type_args: &[Type], @@ -253,12 +270,28 @@ fn fun_completion_item( ); // we omit the first argument which is guaranteed to be there // as this is a method and needs a receiver - let arg_snippet = arg_names[1..] + let mut snippet_idx = 0; + let arg_snippet = arg_names .iter() - .enumerate() - .map(|(idx, name)| format!("${{{}:{}}}", idx + 1, name)) + .zip(arg_types) + .skip(1) + .map(|(name, ty)| { + lamda_snippet(ty, &mut snippet_idx).unwrap_or_else(|| { + let mut arg_name = name.to_string(); + if arg_name.starts_with('$') { + arg_name = arg_name[1..].to_string(); + } + snippet_idx += 1; + format!("${{{}:{}}}", snippet_idx, arg_name) + }) + }) .collect::>() .join(", "); + let macro_suffix = if matches!(fun_type, FunType::Macro) { + "!" + } else { + "" + }; let label_details = Some(CompletionItemLabelDetails { detail: Some(format!( " ({}::{})", @@ -269,10 +302,10 @@ fn fun_completion_item( }); CompletionItem { - label: format!("{}()", method_name,), + label: format!("{}{}()", method_name, macro_suffix), label_details, - kind: Some(CompletionItemKind::SNIPPET), - insert_text: Some(format!("{}({})", method_name, arg_snippet)), + kind: Some(CompletionItemKind::METHOD), + insert_text: Some(format!("{}{}({})", method_name, macro_suffix, arg_snippet)), insert_text_format: Some(InsertTextFormat::SNIPPET), ..Default::default() } @@ -296,32 +329,41 @@ fn dot(symbols: &Symbols, use_fpath: &Path, position: &Position) -> Vec Vec { +pub fn completion_items(pos: Position, path: &Path, symbols: &Symbols) -> Vec { let mut items = vec![]; let Some(fhash) = symbols.file_hash(path) else { @@ -628,178 +670,3 @@ fn completion_items(pos: Position, path: &Path, symbols: &Symbols) -> Vec, - description: Option<&str>, - text: &str, -) { - let item = &items[idx]; - assert!( - item.label == label, - "wrong label for item {} at {}: {:#?}", - idx, - loc, - item - ); - if item.label_details.is_none() { - if detail.is_some() || description.is_some() { - panic!("item {} at {} has no label details: {:#?}", idx, loc, item); - } - } else { - assert!( - item.label_details.as_ref().unwrap().detail == detail.map(|s| s.to_string()), - "wrong label detail (detail) for item {} at {}: {:#?}", - idx, - loc, - item - ); - assert!( - item.label_details.as_ref().unwrap().description == description.map(|s| s.to_string()), - "wrong label detail (description) for item {} at {}: {:#?}", - idx, - loc, - item - ); - assert!( - item.insert_text == Some(text.to_string()), - "wrong inserted text for item {} at {}: {:#?}", - idx, - loc, - item - ); - } -} - -#[test] -/// Tests if symbolication + doc_string information for documented Move constructs is constructed correctly. -fn completion_dot_test() { - use vfs::impls::memory::MemoryFS; - - let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - - path.push("tests/completion"); - - let ide_files_layer: VfsPath = MemoryFS::new().into(); - let (symbols_opt, _) = get_symbols( - Arc::new(Mutex::new(BTreeMap::new())), - ide_files_layer, - path.as_path(), - LintLevel::None, - ) - .unwrap(); - let symbols = symbols_opt.unwrap(); - - let mut fpath = path.clone(); - fpath.push("sources/dot.move"); - let cpath = dunce::canonicalize(&fpath).unwrap(); - - // simple test - let pos = Position { - line: 14, - character: 10, - }; - let items = completion_items(pos, &cpath, &symbols); - let loc = format!("{:?} (line: {}, col: {})", cpath, pos.line, pos.character); - assert!( - items.len() == 3, - "wrong number of items at {} (3 vs {})", - loc.clone(), - items.len() - ); - validate_item( - loc.clone(), - &items, - 0, - "bar()", - Some(" (Completion::dot::bar)"), - Some("fun (SomeStruct, u64, T): SomeStruct"), - "bar(${1:_param1}, ${2:_param2})", - ); - validate_item( - loc.clone(), - &items, - 1, - "foo()", - Some(" (Completion::dot::foo)"), - Some("fun (SomeStruct)"), - "foo()", - ); - validate_item( - loc, - &items, - 2, - "some_field", - None, - Some("u64"), - "some_field", - ); - - // test with aliasing - let pos = Position { - line: 20, - character: 10, - }; - let items = completion_items(pos, &cpath, &symbols); - let loc = format!("{:?} (line: {}, col: {}", cpath, pos.line, pos.character); - assert!(items.len() == 3, "wrong number of items at {}", loc.clone()); - validate_item( - loc.clone(), - &items, - 0, - "bak()", - Some(" (Completion::dot::bar)"), - Some("fun (SomeStruct, u64, T): SomeStruct"), - "bak(${1:_param1}, ${2:_param2})", - ); - validate_item( - loc.clone(), - &items, - 1, - "foo()", - Some(" (Completion::dot::foo)"), - Some("fun (SomeStruct)"), - "foo()", - ); - validate_item( - loc, - &items, - 2, - "some_field", - None, - Some("u64"), - "some_field", - ); - - // test with shadowing - let pos = Position { - line: 26, - character: 10, - }; - let items = completion_items(pos, &cpath, &symbols); - let loc = format!("{:?} (line: {}, col: {}", cpath, pos.line, pos.character); - assert!(items.len() == 2, "wrong number of items at {}", loc.clone()); - validate_item( - loc.clone(), - &items, - 0, - "foo()", - Some(" (Completion::dot::bar)"), - Some("fun (SomeStruct, u64, T): SomeStruct"), - "foo(${1:_param1}, ${2:_param2})", - ); - validate_item( - loc, - &items, - 1, - "some_field", - None, - Some("u64"), - "some_field", - ); -} diff --git a/external-crates/move/crates/move-analyzer/tests/completion/sources/macro_dot.move b/external-crates/move/crates/move-analyzer/tests/completion/sources/macro_dot.move new file mode 100644 index 0000000000000..e929a2086d639 --- /dev/null +++ b/external-crates/move/crates/move-analyzer/tests/completion/sources/macro_dot.move @@ -0,0 +1,11 @@ +module Completion::macro_dot { + public struct SomeStruct has drop {} + + public macro fun foo($_s: SomeStruct, $_param1: u64, $_param2: |u64, u64| -> u64 , $_param3: u64) { + } + + public fun test(s: SomeStruct) { + s. + } + +} diff --git a/external-crates/move/crates/move-analyzer/tests/consts.exp b/external-crates/move/crates/move-analyzer/tests/consts.exp index fcde2116e7578..99b15bf362afe 100644 --- a/external-crates/move/crates/move-analyzer/tests/consts.exp +++ b/external-crates/move/crates/move-analyzer/tests/consts.exp @@ -1,6 +1,6 @@ == M8.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'MY_BOOL', start: 10, end: 17 Def: 'MY_BOOL', line: 2, def char: 10 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: const Symbols::M8::MY_BOOL: bool = false -- test 1 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'PAREN', start: 10, end: 15 Def: 'PAREN', line: 4, def char: 10 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: const Symbols::M8::PAREN: bool = true -- test 2 ------------------- -use line: 6, use_ndx: 0 +use line: 7, use_ndx: 0 Use: 'BLOCK', start: 10, end: 15 Def: 'BLOCK', line: 6, def char: 10 TypeDef: no info @@ -24,7 +24,7 @@ On Hover: const Symbols::M8::BLOCK: bool = true -- test 3 ------------------- -use line: 8, use_ndx: 0 +use line: 9, use_ndx: 0 Use: 'MY_ADDRESS', start: 10, end: 20 Def: 'MY_ADDRESS', line: 8, def char: 10 TypeDef: no info @@ -32,7 +32,7 @@ On Hover: const Symbols::M8::MY_ADDRESS: address = @0x70DD -- test 4 ------------------- -use line: 10, use_ndx: 0 +use line: 11, use_ndx: 0 Use: 'BYTES', start: 10, end: 15 Def: 'BYTES', line: 10, def char: 10 TypeDef: no info @@ -40,7 +40,7 @@ On Hover: const Symbols::M8::BYTES: vector = [104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100] -- test 5 ------------------- -use line: 12, use_ndx: 0 +use line: 13, use_ndx: 0 Use: 'HEX_BYTES', start: 10, end: 19 Def: 'HEX_BYTES', line: 12, def char: 10 TypeDef: no info @@ -48,7 +48,7 @@ On Hover: const Symbols::M8::HEX_BYTES: vector = [222, 173, 190, 239] -- test 6 ------------------- -use line: 14, use_ndx: 0 +use line: 15, use_ndx: 0 Use: 'NUMS', start: 10, end: 14 Def: 'NUMS', line: 14, def char: 10 TypeDef: no info @@ -56,7 +56,7 @@ On Hover: const Symbols::M8::NUMS: vector = [1, 2] -- test 7 ------------------- -use line: 16, use_ndx: 0 +use line: 17, use_ndx: 0 Use: 'RULE', start: 10, end: 14 Def: 'RULE', line: 16, def char: 10 TypeDef: no info @@ -64,7 +64,7 @@ On Hover: const Symbols::M8::RULE: bool = true && false -- test 8 ------------------- -use line: 18, use_ndx: 0 +use line: 19, use_ndx: 0 Use: 'CAP', start: 10, end: 13 Def: 'CAP', line: 18, def char: 10 TypeDef: no info @@ -72,7 +72,7 @@ On Hover: const Symbols::M8::CAP: u64 = 10 * 100 + 1 -- test 9 ------------------- -use line: 20, use_ndx: 0 +use line: 21, use_ndx: 0 Use: 'SHIFTY', start: 10, end: 16 Def: 'SHIFTY', line: 20, def char: 10 TypeDef: no info @@ -80,7 +80,7 @@ On Hover: const Symbols::M8::SHIFTY: u8 = 1 << 1 -- test 10 ------------------- -use line: 22, use_ndx: 0 +use line: 23, use_ndx: 0 Use: 'HALF_MAX', start: 10, end: 18 Def: 'HALF_MAX', line: 22, def char: 10 TypeDef: no info @@ -88,7 +88,7 @@ On Hover: const Symbols::M8::HALF_MAX: u128 = 340282366920938463463374607431768211455 / 2 -- test 11 ------------------- -use line: 24, use_ndx: 0 +use line: 25, use_ndx: 0 Use: 'REM', start: 10, end: 13 Def: 'REM', line: 24, def char: 10 TypeDef: no info @@ -96,7 +96,7 @@ On Hover: const Symbols::M8::REM: u256 = 57896044618658097711785492504343953926634992332820282019728792003956564819968 % 654321 -- test 12 ------------------- -use line: 26, use_ndx: 0 +use line: 27, use_ndx: 0 Use: 'USE_CONST', start: 10, end: 19 Def: 'USE_CONST', line: 26, def char: 10 TypeDef: no info @@ -104,7 +104,7 @@ On Hover: const Symbols::M8::USE_CONST: bool = Symbols::M8::EQUAL == false -- test 13 ------------------- -use line: 26, use_ndx: 1 +use line: 27, use_ndx: 1 Use: 'EQUAL', start: 28, end: 33 Def: 'EQUAL', line: 28, def char: 10 TypeDef: no info @@ -112,7 +112,7 @@ On Hover: const Symbols::M8::EQUAL: bool = 1 == 1 -- test 14 ------------------- -use line: 28, use_ndx: 0 +use line: 29, use_ndx: 0 Use: 'EQUAL', start: 10, end: 15 Def: 'EQUAL', line: 28, def char: 10 TypeDef: no info @@ -120,7 +120,7 @@ On Hover: const Symbols::M8::EQUAL: bool = 1 == 1 -- test 15 ------------------- -use line: 30, use_ndx: 0 +use line: 31, use_ndx: 0 Use: 'ANOTHER_USE_CONST', start: 10, end: 27 Def: 'ANOTHER_USE_CONST', line: 30, def char: 10 TypeDef: no info @@ -128,7 +128,7 @@ On Hover: const Symbols::M8::ANOTHER_USE_CONST: bool = Symbols::M8::EQUAL == false -- test 16 ------------------- -use line: 30, use_ndx: 2 +use line: 31, use_ndx: 2 Use: 'EQUAL', start: 49, end: 54 Def: 'EQUAL', line: 28, def char: 10 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/consts.ide b/external-crates/move/crates/move-analyzer/tests/consts.ide index 4e9971bce146e..8cd5338650268 100644 --- a/external-crates/move/crates/move-analyzer/tests/consts.ide +++ b/external-crates/move/crates/move-analyzer/tests/consts.ide @@ -5,103 +5,103 @@ "M8.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 12, + "use_line": 13, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 16, + "use_line": 17, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 22, + "use_line": 23, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 28, + "use_line": 29, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 30, + "use_line": 31, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 30, + "use_line": 31, "use_ndx": 2 } } diff --git a/external-crates/move/crates/move-analyzer/tests/docstring.exp b/external-crates/move/crates/move-analyzer/tests/docstring.exp index 8a24f1d58b3b4..d4fc4dd628c70 100644 --- a/external-crates/move/crates/move-analyzer/tests/docstring.exp +++ b/external-crates/move/crates/move-analyzer/tests/docstring.exp @@ -1,6 +1,6 @@ == M6.move ======================================================== -- test 0 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'DocumentedStruct', start: 11, end: 27 Def: 'DocumentedStruct', line: 4, def char: 11 TypeDef: 'DocumentedStruct', line: 4, char: 11 @@ -14,7 +14,7 @@ With a multi-line docstring -- test 1 ------------------- -use line: 10, use_ndx: 0 +use line: 11, use_ndx: 0 Use: 'DOCUMENTED_CONSTANT', start: 10, end: 29 Def: 'DOCUMENTED_CONSTANT', line: 10, def char: 10 TypeDef: no info @@ -25,7 +25,7 @@ Constant containing the answer to the universe -- test 2 ------------------- -use line: 14, use_ndx: 0 +use line: 15, use_ndx: 0 Use: 'unpack', start: 8, end: 14 Def: 'unpack', line: 14, def char: 8 TypeDef: no info @@ -36,7 +36,7 @@ A documented function that unpacks a DocumentedStruct -- test 3 ------------------- -use line: 14, use_ndx: 1 +use line: 15, use_ndx: 1 Use: 's', start: 15, end: 16 Def: 's', line: 14, def char: 15 TypeDef: 'DocumentedStruct', line: 4, char: 11 @@ -44,7 +44,7 @@ On Hover: s: Symbols::M6::DocumentedStruct -- test 4 ------------------- -use line: 14, use_ndx: 2 +use line: 15, use_ndx: 2 Use: 'DocumentedStruct', start: 18, end: 34 Def: 'DocumentedStruct', line: 4, def char: 11 TypeDef: 'DocumentedStruct', line: 4, char: 11 @@ -58,7 +58,7 @@ With a multi-line docstring -- test 5 ------------------- -use line: 15, use_ndx: 0 +use line: 16, use_ndx: 0 Use: 'DocumentedStruct', start: 12, end: 28 Def: 'DocumentedStruct', line: 4, def char: 11 TypeDef: 'DocumentedStruct', line: 4, char: 11 @@ -72,7 +72,7 @@ With a multi-line docstring -- test 6 ------------------- -use line: 15, use_ndx: 1 +use line: 16, use_ndx: 1 Use: 'documented_field', start: 31, end: 47 Def: 'documented_field', line: 6, def char: 8 TypeDef: no info @@ -84,7 +84,7 @@ A documented field -- test 7 ------------------- -use line: 15, use_ndx: 3 +use line: 16, use_ndx: 3 Use: 's', start: 59, end: 60 Def: 's', line: 14, def char: 15 TypeDef: 'DocumentedStruct', line: 4, char: 11 @@ -92,7 +92,7 @@ On Hover: s: Symbols::M6::DocumentedStruct -- test 8 ------------------- -use line: 26, use_ndx: 0 +use line: 27, use_ndx: 0 Use: 'other_doc_struct', start: 8, end: 24 Def: 'other_doc_struct', line: 26, def char: 8 TypeDef: no info @@ -109,7 +109,7 @@ It uses the ** format instead of /// -- test 9 ------------------- -use line: 31, use_ndx: 0 +use line: 32, use_ndx: 0 Use: 'acq', start: 8, end: 11 Def: 'acq', line: 31, def char: 8 TypeDef: no info @@ -120,7 +120,7 @@ Asterix based single-line docstring -- test 10 ------------------- -use line: 26, use_ndx: 2 +use line: 27, use_ndx: 2 Use: 'OtherDocStruct', start: 41, end: 55 Def: 'OtherDocStruct', line: 3, def char: 11 TypeDef: 'OtherDocStruct', line: 3, char: 11 @@ -133,7 +133,7 @@ Documented struct in another module -- test 11 ------------------- -use line: 27, use_ndx: 1 +use line: 28, use_ndx: 1 Use: 'create_other_struct', start: 21, end: 40 Def: 'create_other_struct', line: 9, def char: 15 TypeDef: no info @@ -144,7 +144,7 @@ Documented initializer in another module -- test 12 ------------------- -use line: 27, use_ndx: 2 +use line: 28, use_ndx: 2 Use: 'DOCUMENTED_CONSTANT', start: 41, end: 60 Def: 'DOCUMENTED_CONSTANT', line: 10, def char: 10 TypeDef: no info @@ -155,7 +155,7 @@ Constant containing the answer to the universe -- test 13 ------------------- -use line: 38, use_ndx: 1 +use line: 39, use_ndx: 1 Use: 'OtherDocStruct', start: 35, end: 49 Def: 'OtherDocStruct', line: 3, def char: 11 TypeDef: 'OtherDocStruct', line: 3, char: 11 @@ -168,7 +168,7 @@ Documented struct in another module -- test 14 ------------------- -use line: 43, use_ndx: 1 +use line: 44, use_ndx: 1 Use: 'T', start: 23, end: 24 Def: 'T', line: 43, def char: 23 TypeDef: no info @@ -176,7 +176,7 @@ On Hover: T -- test 15 ------------------- -use line: 43, use_ndx: 2 +use line: 44, use_ndx: 2 Use: 'param', start: 39, end: 44 Def: 'param', line: 43, def char: 39 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/docstring.ide b/external-crates/move/crates/move-analyzer/tests/docstring.ide index f4d1867855a83..32ab26ab7e6e0 100644 --- a/external-crates/move/crates/move-analyzer/tests/docstring.ide +++ b/external-crates/move/crates/move-analyzer/tests/docstring.ide @@ -6,97 +6,97 @@ "M6.move": [ { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 31, + "use_line": 32, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 27, + "use_line": 28, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 27, + "use_line": 28, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 38, + "use_line": 39, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 43, + "use_line": 44, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 43, + "use_line": 44, "use_ndx": 2 } } diff --git a/external-crates/move/crates/move-analyzer/tests/dot_calls.exp b/external-crates/move/crates/move-analyzer/tests/dot_calls.exp index 5f44d727bfaba..d7f5f78ba1225 100644 --- a/external-crates/move/crates/move-analyzer/tests/dot_calls.exp +++ b/external-crates/move/crates/move-analyzer/tests/dot_calls.exp @@ -1,6 +1,6 @@ == dot_call.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'Self', start: 19, end: 23 Def: 'M1', line: 0, def char: 17 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: module Move2024::M1 -- test 1 ------------------- -use line: 2, use_ndx: 1 +use line: 3, use_ndx: 1 Use: 'foo', start: 25, end: 28 Def: 'foo', line: 13, def char: 15 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: public fun Move2024::M1::foo(s: &Move2024::M1::SomeStruct): u64 -- test 2 ------------------- -use line: 2, use_ndx: 2 +use line: 3, use_ndx: 2 Use: 'SomeStruct', start: 32, end: 42 Def: 'SomeStruct', line: 5, def char: 18 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -26,7 +26,7 @@ public struct Move2024::M1::SomeStruct has drop { } -- test 3 ------------------- -use line: 2, use_ndx: 3 +use line: 3, use_ndx: 3 Use: 'f1', start: 43, end: 45 Def: 'foo', line: 13, def char: 15 TypeDef: no info @@ -34,7 +34,7 @@ On Hover: public fun Move2024::M1::foo(s: &Move2024::M1::SomeStruct): u64 -- test 4 ------------------- -use line: 3, use_ndx: 0 +use line: 4, use_ndx: 0 Use: 'M1', start: 29, end: 31 Def: 'M1', line: 0, def char: 17 TypeDef: no info @@ -42,7 +42,7 @@ On Hover: module Move2024::M1 -- test 5 ------------------- -use line: 3, use_ndx: 1 +use line: 4, use_ndx: 1 Use: 'foo', start: 33, end: 36 Def: 'foo', line: 13, def char: 15 TypeDef: no info @@ -50,7 +50,7 @@ On Hover: public fun Move2024::M1::foo(s: &Move2024::M1::SomeStruct): u64 -- test 6 ------------------- -use line: 3, use_ndx: 2 +use line: 4, use_ndx: 2 Use: 'SomeStruct', start: 40, end: 50 Def: 'SomeStruct', line: 5, def char: 18 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -60,7 +60,7 @@ public struct Move2024::M1::SomeStruct has drop { } -- test 7 ------------------- -use line: 3, use_ndx: 3 +use line: 4, use_ndx: 3 Use: 'f2', start: 51, end: 53 Def: 'foo', line: 13, def char: 15 TypeDef: no info @@ -68,7 +68,7 @@ On Hover: public fun Move2024::M1::foo(s: &Move2024::M1::SomeStruct): u64 -- test 8 ------------------- -use line: 26, use_ndx: 0 +use line: 27, use_ndx: 0 Use: 'M1_ALIAS', start: 12, end: 20 Def: 'M1', line: 0, def char: 17 TypeDef: no info @@ -76,7 +76,7 @@ On Hover: module Move2024::M1 -- test 9 ------------------- -use line: 26, use_ndx: 1 +use line: 27, use_ndx: 1 Use: 'bar', start: 22, end: 25 Def: 'bar', line: 17, def char: 15 TypeDef: no info @@ -84,7 +84,7 @@ On Hover: public fun Move2024::M1::bar(s: &Move2024::M1::SomeStruct, v: u64): u64 -- test 10 ------------------- -use line: 26, use_ndx: 2 +use line: 27, use_ndx: 2 Use: 'M1', start: 39, end: 41 Def: 'M1', line: 0, def char: 17 TypeDef: no info @@ -92,7 +92,7 @@ On Hover: module Move2024::M1 -- test 11 ------------------- -use line: 26, use_ndx: 3 +use line: 27, use_ndx: 3 Use: 'SomeStruct', start: 43, end: 53 Def: 'SomeStruct', line: 5, def char: 18 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -102,7 +102,7 @@ public struct Move2024::M1::SomeStruct has drop { } -- test 12 ------------------- -use line: 26, use_ndx: 4 +use line: 27, use_ndx: 4 Use: 'f3', start: 54, end: 56 Def: 'bar', line: 17, def char: 15 TypeDef: no info @@ -110,7 +110,7 @@ On Hover: public fun Move2024::M1::bar(s: &Move2024::M1::SomeStruct, v: u64): u64 -- test 13 ------------------- -use line: 29, use_ndx: 0 +use line: 30, use_ndx: 0 Use: 'M1', start: 16, end: 18 Def: 'M1', line: 0, def char: 17 TypeDef: no info @@ -118,7 +118,7 @@ On Hover: module Move2024::M1 -- test 14 ------------------- -use line: 29, use_ndx: 1 +use line: 30, use_ndx: 1 Use: 'bar', start: 20, end: 23 Def: 'bar', line: 17, def char: 15 TypeDef: no info @@ -126,7 +126,7 @@ On Hover: public fun Move2024::M1::bar(s: &Move2024::M1::SomeStruct, v: u64): u64 -- test 15 ------------------- -use line: 29, use_ndx: 2 +use line: 30, use_ndx: 2 Use: 'SomeStructAlias', start: 27, end: 42 Def: 'SomeStruct', line: 5, def char: 18 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -136,7 +136,7 @@ public struct Move2024::M1::SomeStruct has drop { } -- test 16 ------------------- -use line: 29, use_ndx: 3 +use line: 30, use_ndx: 3 Use: 'f4', start: 43, end: 45 Def: 'bar', line: 17, def char: 15 TypeDef: no info @@ -144,7 +144,7 @@ On Hover: public fun Move2024::M1::bar(s: &Move2024::M1::SomeStruct, v: u64): u64 -- test 17 ------------------- -use line: 33, use_ndx: 0 +use line: 34, use_ndx: 0 Use: 'some_struct', start: 16, end: 27 Def: 'some_struct', line: 31, def char: 12 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -152,7 +152,7 @@ On Hover: let some_struct: Move2024::M1::SomeStruct -- test 18 ------------------- -use line: 33, use_ndx: 1 +use line: 34, use_ndx: 1 Use: 'f1', start: 28, end: 30 Def: 'foo', line: 13, def char: 15 TypeDef: no info @@ -160,7 +160,7 @@ On Hover: public fun Move2024::M1::foo(s: &Move2024::M1::SomeStruct): u64 -- test 19 ------------------- -use line: 34, use_ndx: 0 +use line: 35, use_ndx: 0 Use: 'some_struct', start: 16, end: 27 Def: 'some_struct', line: 31, def char: 12 TypeDef: 'SomeStruct', line: 5, char: 18 @@ -168,7 +168,7 @@ On Hover: let some_struct: Move2024::M1::SomeStruct -- test 20 ------------------- -use line: 34, use_ndx: 1 +use line: 35, use_ndx: 1 Use: 'f3', start: 28, end: 30 Def: 'bar', line: 17, def char: 15 TypeDef: no info @@ -176,7 +176,7 @@ On Hover: public fun Move2024::M1::bar(s: &Move2024::M1::SomeStruct, v: u64): u64 -- test 21 ------------------- -use line: 34, use_ndx: 2 +use line: 35, use_ndx: 2 Use: 'val', start: 31, end: 34 Def: 'val', line: 32, def char: 12 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/dot_calls.ide b/external-crates/move/crates/move-analyzer/tests/dot_calls.ide index ff6932b6b90da..6c737153852f2 100644 --- a/external-crates/move/crates/move-analyzer/tests/dot_calls.ide +++ b/external-crates/move/crates/move-analyzer/tests/dot_calls.ide @@ -5,133 +5,133 @@ "dot_call.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 29, + "use_line": 30, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 29, + "use_line": 30, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 29, + "use_line": 30, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 29, + "use_line": 30, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 33, + "use_line": 34, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 33, + "use_line": 34, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 34, + "use_line": 35, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 34, + "use_line": 35, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 34, + "use_line": 35, "use_ndx": 2 } } diff --git a/external-crates/move/crates/move-analyzer/tests/dot_completion.exp b/external-crates/move/crates/move-analyzer/tests/dot_completion.exp new file mode 100644 index 0000000000000..473dffe025aed --- /dev/null +++ b/external-crates/move/crates/move-analyzer/tests/dot_completion.exp @@ -0,0 +1,55 @@ +== dot.move ======================================================== +-- test 0 ------------------- +use line: 15, use_col: 10 +Method 'bar()' + INSERT TEXT: 'bar(${1:_param1}, ${2:_param2})' + TARGET : '(Completion::dot::bar)' + TYPE : 'fun (SomeStruct, u64, T): SomeStruct' +Method 'foo()' + INSERT TEXT: 'foo()' + TARGET : '(Completion::dot::foo)' + TYPE : 'fun (SomeStruct)' +Field 'some_field' + INSERT TEXT: 'some_field' + TYPE : 'u64' + + +-- test 1 ------------------- +use line: 21, use_col: 10 +Method 'bak()' + INSERT TEXT: 'bak(${1:_param1}, ${2:_param2})' + TARGET : '(Completion::dot::bar)' + TYPE : 'fun (SomeStruct, u64, T): SomeStruct' +Method 'foo()' + INSERT TEXT: 'foo()' + TARGET : '(Completion::dot::foo)' + TYPE : 'fun (SomeStruct)' +Field 'some_field' + INSERT TEXT: 'some_field' + TYPE : 'u64' + + +-- test 2 ------------------- +use line: 27, use_col: 10 +Method 'foo()' + INSERT TEXT: 'foo(${1:_param1}, ${2:_param2})' + TARGET : '(Completion::dot::bar)' + TYPE : 'fun (SomeStruct, u64, T): SomeStruct' +Field 'some_field' + INSERT TEXT: 'some_field' + TYPE : 'u64' + + +== macro_dot.move ======================================================== +-- test 0 ------------------- +use line: 8, use_col: 10 +Method 'foo!()' + INSERT TEXT: 'foo!(${1:_param1}, |${2}, ${3}| ${4}, ${5:_param3})' + TARGET : '(Completion::macro_dot::foo)' + TYPE : 'fun (SomeStruct, u64, |u64, u64| -> u64, u64)' +Method 'test()' + INSERT TEXT: 'test()' + TARGET : '(Completion::macro_dot::test)' + TYPE : 'fun (SomeStruct)' + + diff --git a/external-crates/move/crates/move-analyzer/tests/dot_completion.ide b/external-crates/move/crates/move-analyzer/tests/dot_completion.ide new file mode 100644 index 0000000000000..dab18944bb5bb --- /dev/null +++ b/external-crates/move/crates/move-analyzer/tests/dot_completion.ide @@ -0,0 +1,40 @@ +// Tests dot completions +{ + "project": "tests/completion", + "file_tests": { + // tests completion for fields and "regular" functions + "dot.move": [ + { + // simple test + "CompletionTest": { + "use_line": 15, + "use_col": 10 + } + }, + { + // with aliasing + "CompletionTest": { + "use_line": 21, + "use_col": 10 + } + }, + { + // with shadowing + "CompletionTest": { + "use_line": 27, + "use_col": 10 + } + } + ], + // tests completion for macros including addition of `!` at the call site + // and expansion of lambda parameters into their own snippets + "macro_dot.move": [ + { + "CompletionTest": { + "use_line": 8, + "use_col": 10 + } + } + ] + } +} \ No newline at end of file diff --git a/external-crates/move/crates/move-analyzer/tests/enums.exp b/external-crates/move/crates/move-analyzer/tests/enums.exp index e93f78b6ece54..6025ff14bd7fe 100644 --- a/external-crates/move/crates/move-analyzer/tests/enums.exp +++ b/external-crates/move/crates/move-analyzer/tests/enums.exp @@ -1,6 +1,6 @@ == int_match.move ======================================================== -- test 0 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'bound_var', start: 12, end: 21 Def: 'bound_var', line: 4, def char: 12 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: bound_var: u64 -- test 1 ------------------- -use line: 4, use_ndx: 1 +use line: 5, use_ndx: 1 Use: 'bound_var', start: 38, end: 47 Def: 'bound_var', line: 4, def char: 12 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: bound_var: &u64 -- test 2 ------------------- -use line: 4, use_ndx: 2 +use line: 5, use_ndx: 2 Use: 'bound_var', start: 57, end: 66 Def: 'bound_var', line: 4, def char: 12 TypeDef: no info @@ -24,7 +24,7 @@ On Hover: bound_var: u64 -- test 3 ------------------- -use line: 5, use_ndx: 0 +use line: 6, use_ndx: 0 Use: 'another_var', start: 12, end: 23 Def: 'another_var', line: 5, def char: 12 TypeDef: no info @@ -32,7 +32,7 @@ On Hover: another_var: u64 -- test 4 ------------------- -use line: 5, use_ndx: 1 +use line: 6, use_ndx: 1 Use: 'another_var', start: 27, end: 38 Def: 'another_var', line: 5, def char: 12 TypeDef: no info @@ -41,7 +41,7 @@ another_var: u64 == long_enum.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'LongEnum', start: 16, end: 24 Def: 'LongEnum', line: 2, def char: 16 TypeDef: 'LongEnum', line: 2, char: 16 @@ -58,7 +58,7 @@ public enum Enums::long_enum::LongEnum { == mut_match.move ======================================================== -- test 0 ------------------- -use line: 3, use_ndx: 0 +use line: 4, use_ndx: 0 Use: 'mut_param', start: 15, end: 24 Def: 'mut_param', line: 2, def char: 25 TypeDef: no info @@ -66,7 +66,7 @@ On Hover: mut_param: &mut u64 -- test 1 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'mut_var', start: 12, end: 19 Def: 'mut_var', line: 4, def char: 12 TypeDef: no info @@ -74,7 +74,7 @@ On Hover: mut_var: &mut u64 -- test 2 ------------------- -use line: 4, use_ndx: 1 +use line: 5, use_ndx: 1 Use: 'mut_var', start: 25, end: 32 Def: 'mut_var', line: 4, def char: 12 TypeDef: no info @@ -82,7 +82,7 @@ On Hover: mut_var: &u64 -- test 3 ------------------- -use line: 4, use_ndx: 2 +use line: 5, use_ndx: 2 Use: 'mut_var', start: 43, end: 50 Def: 'mut_var', line: 4, def char: 12 TypeDef: no info @@ -91,7 +91,7 @@ mut_var: &mut u64 == nested_guard.move ======================================================== -- test 0 ------------------- -use line: 3, use_ndx: 2 +use line: 4, use_ndx: 2 Use: 'nested_var', start: 30, end: 40 Def: 'nested_var', line: 3, def char: 30 TypeDef: no info @@ -99,7 +99,7 @@ On Hover: nested_var: bool -- test 1 ------------------- -use line: 3, use_ndx: 3 +use line: 4, use_ndx: 3 Use: 'nested_var', start: 47, end: 57 Def: 'nested_var', line: 3, def char: 30 TypeDef: no info @@ -107,7 +107,7 @@ On Hover: nested_var: &bool -- test 2 ------------------- -use line: 3, use_ndx: 4 +use line: 4, use_ndx: 4 Use: 'nested_var', start: 62, end: 72 Def: 'nested_var', line: 3, def char: 30 TypeDef: no info @@ -116,7 +116,7 @@ nested_var: bool == nested_match.move ======================================================== -- test 0 ------------------- -use line: 14, use_ndx: 2 +use line: 15, use_ndx: 2 Use: 'num', start: 40, end: 43 Def: 'T1', line: 3, def char: 25 TypeDef: no info @@ -125,7 +125,7 @@ Enums::nested_match::OuterEnum 0: T1 -- test 1 ------------------- -use line: 14, use_ndx: 3 +use line: 15, use_ndx: 3 Use: 'InnerEnum', start: 45, end: 54 Def: 'InnerEnum', line: 7, def char: 16 TypeDef: 'InnerEnum', line: 7, char: 16 @@ -136,7 +136,7 @@ public enum Enums::nested_match::InnerEnum has drop { } -- test 2 ------------------- -use line: 14, use_ndx: 4 +use line: 15, use_ndx: 4 Use: 'Left', start: 56, end: 60 Def: 'Left', line: 8, def char: 8 TypeDef: no info @@ -144,7 +144,7 @@ On Hover: Enums::nested_match::InnerEnum::Left(L) -- test 3 ------------------- -use line: 14, use_ndx: 5 +use line: 15, use_ndx: 5 Use: 'inner_num', start: 61, end: 70 Def: 'L', line: 8, def char: 13 TypeDef: no info @@ -153,7 +153,7 @@ Enums::nested_match::InnerEnum 0: L -- test 4 ------------------- -use line: 14, use_ndx: 6 +use line: 15, use_ndx: 6 Use: 'num', start: 76, end: 79 Def: 'num', line: 14, def char: 40 TypeDef: no info @@ -161,7 +161,7 @@ On Hover: num: u64 -- test 5 ------------------- -use line: 14, use_ndx: 7 +use line: 15, use_ndx: 7 Use: 'inner_num', start: 82, end: 91 Def: 'inner_num', line: 14, def char: 61 TypeDef: no info @@ -169,7 +169,7 @@ On Hover: inner_num: u64 -- test 6 ------------------- -use line: 15, use_ndx: 2 +use line: 16, use_ndx: 2 Use: 'field', start: 37, end: 42 Def: 'field', line: 4, def char: 22 TypeDef: no info @@ -178,7 +178,7 @@ Enums::nested_match::OuterEnum field: T2 -- test 7 ------------------- -use line: 15, use_ndx: 3 +use line: 16, use_ndx: 3 Use: 'InnerEnum', start: 44, end: 53 Def: 'InnerEnum', line: 7, def char: 16 TypeDef: 'InnerEnum', line: 7, char: 16 @@ -189,7 +189,7 @@ public enum Enums::nested_match::InnerEnum has drop { } -- test 8 ------------------- -use line: 15, use_ndx: 4 +use line: 16, use_ndx: 4 Use: 'Right', start: 55, end: 60 Def: 'Right', line: 9, def char: 8 TypeDef: no info @@ -197,7 +197,7 @@ On Hover: Enums::nested_match::InnerEnum::Right(R) -- test 9 ------------------- -use line: 15, use_ndx: 5 +use line: 16, use_ndx: 5 Use: 'inner_num', start: 61, end: 70 Def: 'R', line: 9, def char: 14 TypeDef: no info @@ -206,7 +206,7 @@ Enums::nested_match::InnerEnum 0: R -- test 10 ------------------- -use line: 15, use_ndx: 6 +use line: 16, use_ndx: 6 Use: 'inner_num', start: 77, end: 86 Def: 'inner_num', line: 15, def char: 61 TypeDef: no info @@ -215,7 +215,7 @@ inner_num: u64 == struct_match.move ======================================================== -- test 0 ------------------- -use line: 12, use_ndx: 0 +use line: 13, use_ndx: 0 Use: 's', start: 15, end: 16 Def: 's', line: 11, def char: 28 TypeDef: 'AnotherStruct', line: 6, char: 18 @@ -223,7 +223,7 @@ On Hover: s: Enums::struct_match::AnotherStruct -- test 1 ------------------- -use line: 13, use_ndx: 0 +use line: 14, use_ndx: 0 Use: 'AnotherStruct', start: 12, end: 25 Def: 'AnotherStruct', line: 6, def char: 18 TypeDef: 'AnotherStruct', line: 6, char: 18 @@ -234,7 +234,7 @@ public struct Enums::struct_match::AnotherStruct has drop { } -- test 2 ------------------- -use line: 13, use_ndx: 1 +use line: 14, use_ndx: 1 Use: 'field', start: 28, end: 33 Def: 'field', line: 7, def char: 8 TypeDef: no info @@ -243,7 +243,7 @@ Enums::struct_match::AnotherStruct field: u64 -- test 3 ------------------- -use line: 13, use_ndx: 2 +use line: 14, use_ndx: 2 Use: 'field', start: 43, end: 48 Def: 'field', line: 13, def char: 28 TypeDef: no info @@ -251,7 +251,7 @@ On Hover: field: u64 -- test 4 ------------------- -use line: 14, use_ndx: 1 +use line: 15, use_ndx: 1 Use: 'another_field', start: 33, end: 46 Def: 'another_field', line: 8, def char: 8 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -260,7 +260,7 @@ Enums::struct_match::AnotherStruct another_field: Enums::struct_match::SomeStruct -- test 5 ------------------- -use line: 14, use_ndx: 2 +use line: 15, use_ndx: 2 Use: 'SomeStruct', start: 48, end: 58 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -270,7 +270,7 @@ public struct Enums::struct_match::SomeStruct has drop { } -- test 6 ------------------- -use line: 14, use_ndx: 3 +use line: 15, use_ndx: 3 Use: 'some_field', start: 61, end: 71 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -279,7 +279,7 @@ Enums::struct_match::SomeStruct some_field: u64 -- test 7 ------------------- -use line: 14, use_ndx: 4 +use line: 15, use_ndx: 4 Use: 'some_field', start: 79, end: 89 Def: 'some_field', line: 14, def char: 61 TypeDef: no info @@ -288,7 +288,7 @@ some_field: u64 == variant_match.move ======================================================== -- test 0 ------------------- -use line: 6, use_ndx: 0 +use line: 7, use_ndx: 0 Use: 'SomeEnum', start: 16, end: 24 Def: 'SomeEnum', line: 6, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -300,7 +300,7 @@ public enum Enums::variant_match::SomeEnum has drop { } -- test 1 ------------------- -use line: 7, use_ndx: 0 +use line: 8, use_ndx: 0 Use: 'PositionalFields', start: 8, end: 24 Def: 'PositionalFields', line: 7, def char: 8 TypeDef: no info @@ -308,7 +308,7 @@ On Hover: Enums::variant_match::SomeEnum::PositionalFields(u64, Enums::variant_match::SomeStruct) -- test 2 ------------------- -use line: 7, use_ndx: 1 +use line: 8, use_ndx: 1 Use: 'SomeStruct', start: 30, end: 40 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -318,7 +318,7 @@ public struct Enums::variant_match::SomeStruct has drop { } -- test 3 ------------------- -use line: 8, use_ndx: 0 +use line: 9, use_ndx: 0 Use: 'NamedFields', start: 8, end: 19 Def: 'NamedFields', line: 8, def char: 8 TypeDef: no info @@ -326,7 +326,7 @@ On Hover: Enums::variant_match::SomeEnum::NamedFields{num1: u64, num2: u64, s: Enums::variant_match::SomeStruct} -- test 4 ------------------- -use line: 8, use_ndx: 1 +use line: 9, use_ndx: 1 Use: 'num1', start: 21, end: 25 Def: 'num1', line: 8, def char: 21 TypeDef: no info @@ -335,7 +335,7 @@ Enums::variant_match::SomeEnum num1: u64 -- test 5 ------------------- -use line: 8, use_ndx: 2 +use line: 9, use_ndx: 2 Use: 'num2', start: 32, end: 36 Def: 'num2', line: 8, def char: 32 TypeDef: no info @@ -344,7 +344,7 @@ Enums::variant_match::SomeEnum num2: u64 -- test 6 ------------------- -use line: 8, use_ndx: 3 +use line: 9, use_ndx: 3 Use: 's', start: 43, end: 44 Def: 's', line: 8, def char: 43 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -353,7 +353,7 @@ Enums::variant_match::SomeEnum s: Enums::variant_match::SomeStruct -- test 7 ------------------- -use line: 8, use_ndx: 4 +use line: 9, use_ndx: 4 Use: 'SomeStruct', start: 46, end: 56 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -363,7 +363,7 @@ public struct Enums::variant_match::SomeStruct has drop { } -- test 8 ------------------- -use line: 9, use_ndx: 0 +use line: 10, use_ndx: 0 Use: 'Empty', start: 8, end: 13 Def: 'Empty', line: 9, def char: 8 TypeDef: no info @@ -371,7 +371,7 @@ On Hover: Enums::variant_match::SomeEnum::Empty -- test 9 ------------------- -use line: 14, use_ndx: 0 +use line: 15, use_ndx: 0 Use: 'e', start: 16, end: 17 Def: 'e', line: 14, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -379,7 +379,7 @@ On Hover: let mut e: Enums::variant_match::SomeEnum -- test 10 ------------------- -use line: 14, use_ndx: 1 +use line: 15, use_ndx: 1 Use: 'SE', start: 20, end: 22 Def: 'SomeEnum', line: 6, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -391,7 +391,7 @@ public enum Enums::variant_match::SomeEnum has drop { } -- test 11 ------------------- -use line: 14, use_ndx: 3 +use line: 15, use_ndx: 3 Use: 's', start: 45, end: 46 Def: 'SomeStruct', line: 7, def char: 30 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -400,7 +400,7 @@ Enums::variant_match::SomeEnum 1: Enums::variant_match::SomeStruct -- test 12 ------------------- -use line: 18, use_ndx: 0 +use line: 19, use_ndx: 0 Use: 'e', start: 20, end: 21 Def: 'e', line: 14, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -408,7 +408,7 @@ On Hover: let mut e: Enums::variant_match::SomeEnum -- test 13 ------------------- -use line: 19, use_ndx: 0 +use line: 20, use_ndx: 0 Use: 'SomeEnum', start: 12, end: 20 Def: 'SomeEnum', line: 6, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -420,7 +420,7 @@ public enum Enums::variant_match::SomeEnum has drop { } -- test 14 ------------------- -use line: 19, use_ndx: 1 +use line: 20, use_ndx: 1 Use: 'PositionalFields', start: 22, end: 38 Def: 'PositionalFields', line: 7, def char: 8 TypeDef: no info @@ -428,7 +428,7 @@ On Hover: Enums::variant_match::SomeEnum::PositionalFields(u64, Enums::variant_match::SomeStruct) -- test 15 ------------------- -use line: 19, use_ndx: 2 +use line: 20, use_ndx: 2 Use: 'num', start: 39, end: 42 Def: 'u64', line: 7, def char: 25 TypeDef: no info @@ -437,7 +437,7 @@ Enums::variant_match::SomeEnum 0: u64 -- test 16 ------------------- -use line: 19, use_ndx: 3 +use line: 20, use_ndx: 3 Use: 's', start: 44, end: 45 Def: 'SomeStruct', line: 7, def char: 30 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -446,7 +446,7 @@ Enums::variant_match::SomeEnum 1: Enums::variant_match::SomeStruct -- test 17 ------------------- -use line: 20, use_ndx: 0 +use line: 21, use_ndx: 0 Use: 'num', start: 17, end: 20 Def: 'num', line: 19, def char: 39 TypeDef: no info @@ -454,7 +454,7 @@ On Hover: num: &mut u64 -- test 18 ------------------- -use line: 20, use_ndx: 1 +use line: 21, use_ndx: 1 Use: 's', start: 23, end: 24 Def: 's', line: 19, def char: 44 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -462,7 +462,7 @@ On Hover: s: &mut Enums::variant_match::SomeStruct -- test 19 ------------------- -use line: 20, use_ndx: 2 +use line: 21, use_ndx: 2 Use: 'some_field', start: 25, end: 35 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -471,7 +471,7 @@ Enums::variant_match::SomeStruct some_field: u64 -- test 20 ------------------- -use line: 23, use_ndx: 0 +use line: 24, use_ndx: 0 Use: 'SE', start: 12, end: 14 Def: 'SomeEnum', line: 6, def char: 16 TypeDef: 'SomeEnum', line: 6, char: 16 @@ -483,7 +483,7 @@ public enum Enums::variant_match::SomeEnum has drop { } -- test 21 ------------------- -use line: 23, use_ndx: 1 +use line: 24, use_ndx: 1 Use: 'NamedFields', start: 16, end: 27 Def: 'NamedFields', line: 8, def char: 8 TypeDef: no info @@ -491,7 +491,7 @@ On Hover: Enums::variant_match::SomeEnum::NamedFields{num1: u64, num2: u64, s: Enums::variant_match::SomeStruct} -- test 22 ------------------- -use line: 23, use_ndx: 2 +use line: 24, use_ndx: 2 Use: 'num1', start: 30, end: 34 Def: 'num1', line: 8, def char: 21 TypeDef: no info @@ -500,7 +500,7 @@ Enums::variant_match::SomeEnum num1: u64 -- test 23 ------------------- -use line: 23, use_ndx: 3 +use line: 24, use_ndx: 3 Use: 'num2', start: 36, end: 40 Def: 'num2', line: 8, def char: 32 TypeDef: no info @@ -509,7 +509,7 @@ Enums::variant_match::SomeEnum num2: u64 -- test 24 ------------------- -use line: 23, use_ndx: 4 +use line: 24, use_ndx: 4 Use: 's', start: 46, end: 47 Def: 's', line: 8, def char: 43 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -518,7 +518,7 @@ Enums::variant_match::SomeEnum s: Enums::variant_match::SomeStruct -- test 25 ------------------- -use line: 23, use_ndx: 5 +use line: 24, use_ndx: 5 Use: 'num1', start: 55, end: 59 Def: 'num1', line: 23, def char: 30 TypeDef: no info @@ -526,7 +526,7 @@ On Hover: num1: &u64 -- test 26 ------------------- -use line: 23, use_ndx: 6 +use line: 24, use_ndx: 6 Use: 's', start: 62, end: 63 Def: 's', line: 23, def char: 46 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -534,7 +534,7 @@ On Hover: s: &Enums::variant_match::SomeStruct -- test 27 ------------------- -use line: 23, use_ndx: 8 +use line: 24, use_ndx: 8 Use: 'num1', start: 79, end: 83 Def: 'num1', line: 23, def char: 30 TypeDef: no info @@ -542,7 +542,7 @@ On Hover: num1: &u64 -- test 28 ------------------- -use line: 23, use_ndx: 9 +use line: 24, use_ndx: 9 Use: 'local', start: 86, end: 91 Def: 'local', line: 16, def char: 12 TypeDef: no info @@ -550,7 +550,7 @@ On Hover: let local: u64 -- test 29 ------------------- -use line: 24, use_ndx: 0 +use line: 25, use_ndx: 0 Use: 's', start: 16, end: 17 Def: 's', line: 23, def char: 46 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -558,7 +558,7 @@ On Hover: s: &mut Enums::variant_match::SomeStruct -- test 30 ------------------- -use line: 24, use_ndx: 2 +use line: 25, use_ndx: 2 Use: 'num1', start: 32, end: 36 Def: 'num1', line: 23, def char: 30 TypeDef: no info @@ -566,7 +566,7 @@ On Hover: num1: &mut u64 -- test 31 ------------------- -use line: 24, use_ndx: 3 +use line: 25, use_ndx: 3 Use: 'num2', start: 40, end: 44 Def: 'num2', line: 23, def char: 36 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/enums.ide b/external-crates/move/crates/move-analyzer/tests/enums.ide index abbd96dc05e81..6dc5851a0300b 100644 --- a/external-crates/move/crates/move-analyzer/tests/enums.ide +++ b/external-crates/move/crates/move-analyzer/tests/enums.ide @@ -6,193 +6,193 @@ "variant_match.move": [ { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 6 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 8 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 9 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 3 } } @@ -201,49 +201,49 @@ "struct_match.move": [ { "UseDefTest": { - "use_line": 12, + "use_line": 13, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 13, + "use_line": 14, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 13, + "use_line": 14, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 13, + "use_line": 14, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 4 } } @@ -252,31 +252,31 @@ "int_match.move": [ { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 5, + "use_line": 6, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 5, + "use_line": 6, "use_ndx": 1 } } @@ -285,7 +285,7 @@ "long_enum.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } } @@ -294,25 +294,25 @@ "mut_match.move": [ { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 2 } } @@ -321,67 +321,67 @@ "nested_match.move": [ { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 6 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 7 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 6 } } @@ -391,19 +391,19 @@ "nested_guard.move": [ { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 4 } } diff --git a/external-crates/move/crates/move-analyzer/tests/ide_testsuite.rs b/external-crates/move/crates/move-analyzer/tests/ide_testsuite.rs index ec46d2d20b0f5..ed74f2553d1c5 100644 --- a/external-crates/move/crates/move-analyzer/tests/ide_testsuite.rs +++ b/external-crates/move/crates/move-analyzer/tests/ide_testsuite.rs @@ -11,8 +11,9 @@ use std::{ use json_comments::StripComments; use lsp_types::Position; -use move_analyzer::symbols::{ - def_info_doc_string, get_symbols, maybe_convert_for_guard, Symbols, UseDefMap, +use move_analyzer::{ + completion::completion_items, + symbols::{def_info_doc_string, get_symbols, maybe_convert_for_guard, Symbols, UseDefMap}, }; use move_command_line_common::testing::{ add_update_baseline_fix, format_diff, read_env_update_baseline, EXP_EXT, @@ -30,6 +31,7 @@ struct TestSuite { #[derive(Serialize, Deserialize)] enum TestEntry { UseDefTest(UseDefTest), + CompletionTest(CompletionTest), } #[derive(Serialize, Deserialize)] @@ -38,6 +40,12 @@ struct UseDefTest { use_ndx: usize, } +#[derive(Serialize, Deserialize)] +struct CompletionTest { + use_line: u32, + use_col: u32, +} + impl UseDefTest { fn test( &self, @@ -48,12 +56,12 @@ impl UseDefTest { use_file: &str, use_file_path: &Path, ) -> anyhow::Result<()> { - // let file_name_mapping = &symbols.file_name_mapping; let def_info = &symbols.def_info; let UseDefTest { use_ndx, use_line } = self; writeln!(output, "-- test {test_idx} -------------------")?; writeln!(output, "use line: {use_line}, use_ndx: {use_ndx}")?; - let Some(uses) = mod_symbols.get(*use_line) else { + let lsp_use_line = use_line - 1; // 0th-based + let Some(uses) = mod_symbols.get(lsp_use_line) else { writeln!( output, "ERROR: No use_line {use_line} in mod_symbols {mod_symbols:#?} for file {use_file}" @@ -92,7 +100,7 @@ impl UseDefTest { use_def.render( output, symbols, - *use_line, + lsp_use_line, &use_file_content, &def_file_content, )?; @@ -104,7 +112,7 @@ impl UseDefTest { if let Some(guard_def) = maybe_convert_for_guard( def, use_file_path, - &Position::new(*use_line, use_def.col_start()), + &Position::new(lsp_use_line, use_def.col_start()), symbols, ) { writeln!( @@ -131,6 +139,43 @@ impl UseDefTest { } } +impl CompletionTest { + fn test( + &self, + test_idx: usize, + symbols: &Symbols, + output: &mut dyn std::io::Write, + use_file_path: &Path, + ) -> anyhow::Result<()> { + let lsp_use_line = self.use_line - 1; // 0th-based + let use_pos = Position { + line: lsp_use_line, + character: self.use_col, + }; + let items = completion_items(use_pos, use_file_path, symbols); + writeln!(output, "-- test {test_idx} -------------------")?; + writeln!( + output, + "use line: {}, use_col: {}", + self.use_line, self.use_col + )?; + for i in items { + writeln!(output, "{:?} '{}'", i.kind.unwrap(), i.label)?; + writeln!(output, "\tINSERT TEXT: '{}'", i.insert_text.unwrap())?; + if let Some(label_details) = i.label_details { + if let Some(detail) = label_details.detail { + writeln!(output, "\tTARGET : '{}'", detail.trim())?; + } + if let Some(description) = label_details.description { + writeln!(output, "\tTYPE : '{description}'")?; + } + } + } + writeln!(output)?; + Ok(()) + } +} + fn check_expected(expected_path: &Path, result: &str) -> anyhow::Result<()> { let update_baseline = read_env_update_baseline(); @@ -197,6 +242,9 @@ fn move_ide_testsuite(test_path: &Path) -> datatest_stable::Result<()> { TestEntry::UseDefTest(use_def_test) => { use_def_test.test(idx, mod_symbols, &symbols, writer, &file, &cpath)? } + TestEntry::CompletionTest(completion_test) => { + completion_test.test(idx, &symbols, writer, &cpath)?; + } }; writeln!(writer)?; } diff --git a/external-crates/move/crates/move-analyzer/tests/implicit_uses.exp b/external-crates/move/crates/move-analyzer/tests/implicit_uses.exp index 064e5d4214d84..71a24a5239fe0 100644 --- a/external-crates/move/crates/move-analyzer/tests/implicit_uses.exp +++ b/external-crates/move/crates/move-analyzer/tests/implicit_uses.exp @@ -1,6 +1,6 @@ == implicit_uses.move ======================================================== -- test 0 ------------------- -use line: 3, use_ndx: 1 +use line: 4, use_ndx: 1 Use: 'Option', start: 13, end: 19 Def: 'Option', line: 6, def char: 11 TypeDef: 'Option', line: 6, char: 11 @@ -14,7 +14,7 @@ zero or one because Move bytecode does not have ADTs. -- test 1 ------------------- -use line: 7, use_ndx: 2 +use line: 8, use_ndx: 2 Use: 'option', start: 26, end: 32 Def: 'option', line: 1, def char: 12 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/implicit_uses.ide b/external-crates/move/crates/move-analyzer/tests/implicit_uses.ide index 9adec5d8f45ea..ba115d676c1ce 100644 --- a/external-crates/move/crates/move-analyzer/tests/implicit_uses.ide +++ b/external-crates/move/crates/move-analyzer/tests/implicit_uses.ide @@ -5,13 +5,13 @@ "implicit_uses.move": [ { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 2 } } diff --git a/external-crates/move/crates/move-analyzer/tests/imports.exp b/external-crates/move/crates/move-analyzer/tests/imports.exp index ebb1c7df3e1f4..9fde0cfd229db 100644 --- a/external-crates/move/crates/move-analyzer/tests/imports.exp +++ b/external-crates/move/crates/move-analyzer/tests/imports.exp @@ -1,6 +1,6 @@ == M9.move ======================================================== -- test 0 ------------------- -use line: 1, use_ndx: 0 +use line: 2, use_ndx: 0 Use: 'M9', start: 16, end: 18 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -11,7 +11,7 @@ A module doc comment -- test 1 ------------------- -use line: 7, use_ndx: 0 +use line: 8, use_ndx: 0 Use: 'M1', start: 17, end: 19 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -19,7 +19,7 @@ On Hover: module Symbols::M1 -- test 2 ------------------- -use line: 8, use_ndx: 0 +use line: 9, use_ndx: 0 Use: 'M1', start: 17, end: 19 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -27,7 +27,7 @@ On Hover: module Symbols::M1 -- test 3 ------------------- -use line: 8, use_ndx: 1 +use line: 9, use_ndx: 1 Use: 'ALIAS_M1', start: 23, end: 31 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -35,7 +35,7 @@ On Hover: module Symbols::M1 -- test 4 ------------------- -use line: 9, use_ndx: 0 +use line: 10, use_ndx: 0 Use: 'M1', start: 18, end: 20 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -43,7 +43,7 @@ On Hover: module Symbols::M1 -- test 5 ------------------- -use line: 9, use_ndx: 1 +use line: 10, use_ndx: 1 Use: 'BLAH', start: 24, end: 28 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -51,7 +51,7 @@ On Hover: module Symbols::M1 -- test 6 ------------------- -use line: 9, use_ndx: 2 +use line: 10, use_ndx: 2 Use: 'M2', start: 30, end: 32 Def: 'M2', line: 0, def char: 16 TypeDef: no info @@ -59,7 +59,7 @@ On Hover: module Symbols::M2 -- test 7 ------------------- -use line: 9, use_ndx: 3 +use line: 10, use_ndx: 3 Use: 'BLEH', start: 36, end: 40 Def: 'M2', line: 0, def char: 16 TypeDef: no info @@ -67,7 +67,7 @@ On Hover: module Symbols::M2 -- test 8 ------------------- -use line: 10, use_ndx: 1 +use line: 11, use_ndx: 1 Use: 'SomeOtherStruct', start: 22, end: 37 Def: 'SomeOtherStruct', line: 2, def char: 11 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -77,7 +77,7 @@ struct Symbols::M2::SomeOtherStruct has drop { } -- test 9 ------------------- -use line: 10, use_ndx: 2 +use line: 11, use_ndx: 2 Use: 'S', start: 41, end: 42 Def: 'SomeOtherStruct', line: 2, def char: 11 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -87,7 +87,7 @@ struct Symbols::M2::SomeOtherStruct has drop { } -- test 10 ------------------- -use line: 32, use_ndx: 0 +use line: 33, use_ndx: 0 Use: 'M1', start: 21, end: 23 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -95,7 +95,7 @@ On Hover: module Symbols::M1 -- test 11 ------------------- -use line: 32, use_ndx: 1 +use line: 33, use_ndx: 1 Use: 'ANOTHER_ALIAS_M1', start: 27, end: 43 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -103,7 +103,7 @@ On Hover: module Symbols::M1 -- test 12 ------------------- -use line: 37, use_ndx: 1 +use line: 38, use_ndx: 1 Use: 'S', start: 27, end: 28 Def: 'SomeOtherStruct', line: 2, def char: 11 TypeDef: 'SomeOtherStruct', line: 2, char: 11 diff --git a/external-crates/move/crates/move-analyzer/tests/imports.ide b/external-crates/move/crates/move-analyzer/tests/imports.ide index a7014f9147f52..138f5a8995b94 100644 --- a/external-crates/move/crates/move-analyzer/tests/imports.ide +++ b/external-crates/move/crates/move-analyzer/tests/imports.ide @@ -5,79 +5,79 @@ "M9.move": [ { "UseDefTest": { - "use_line": 1, + "use_line": 2, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 1 } } diff --git a/external-crates/move/crates/move-analyzer/tests/let_mut.exp b/external-crates/move/crates/move-analyzer/tests/let_mut.exp index 0ed24bfbbb50d..121223d0c2237 100644 --- a/external-crates/move/crates/move-analyzer/tests/let_mut.exp +++ b/external-crates/move/crates/move-analyzer/tests/let_mut.exp @@ -1,6 +1,6 @@ == let_mut.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 1 +use line: 3, use_ndx: 1 Use: 'p', start: 23, end: 24 Def: 'p', line: 2, def char: 23 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: mut p: u64 -- test 1 ------------------- -use line: 3, use_ndx: 0 +use line: 4, use_ndx: 0 Use: 'p', start: 8, end: 9 Def: 'p', line: 2, def char: 23 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: mut p: u64 -- test 2 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'v', start: 16, end: 17 Def: 'v', line: 4, def char: 16 TypeDef: no info @@ -24,7 +24,7 @@ On Hover: let mut v: u64 -- test 3 ------------------- -use line: 5, use_ndx: 0 +use line: 6, use_ndx: 0 Use: 'v', start: 8, end: 9 Def: 'v', line: 4, def char: 16 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/let_mut.ide b/external-crates/move/crates/move-analyzer/tests/let_mut.ide index c0a2ca77d87d1..7b0810fd7ad34 100644 --- a/external-crates/move/crates/move-analyzer/tests/let_mut.ide +++ b/external-crates/move/crates/move-analyzer/tests/let_mut.ide @@ -5,25 +5,25 @@ "let_mut.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 5, + "use_line": 6, "use_ndx": 0 } } diff --git a/external-crates/move/crates/move-analyzer/tests/macros.exp b/external-crates/move/crates/move-analyzer/tests/macros.exp index 3cf5f3715a966..10f0e3341fc97 100644 --- a/external-crates/move/crates/move-analyzer/tests/macros.exp +++ b/external-crates/move/crates/move-analyzer/tests/macros.exp @@ -1,6 +1,6 @@ == fun_type.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'entry_fun', start: 14, end: 23 Def: 'entry_fun', line: 2, def char: 14 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: entry fun Macros::fun_type::entry_fun() -- test 1 ------------------- -use line: 5, use_ndx: 0 +use line: 6, use_ndx: 0 Use: 'macro_fun', start: 14, end: 23 Def: 'macro_fun', line: 5, def char: 14 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: macro fun Macros::fun_type::macro_fun() -- test 2 ------------------- -use line: 9, use_ndx: 0 +use line: 10, use_ndx: 0 Use: 'entry_fun', start: 8, end: 17 Def: 'entry_fun', line: 2, def char: 14 TypeDef: no info @@ -24,7 +24,7 @@ On Hover: entry fun Macros::fun_type::entry_fun() -- test 3 ------------------- -use line: 10, use_ndx: 0 +use line: 11, use_ndx: 0 Use: 'macro_fun', start: 8, end: 17 Def: 'macro_fun', line: 5, def char: 14 TypeDef: no info @@ -33,7 +33,7 @@ macro fun Macros::fun_type::macro_fun() == macros.move ======================================================== -- test 0 ------------------- -use line: 6, use_ndx: 0 +use line: 7, use_ndx: 0 Use: 'foo', start: 14, end: 17 Def: 'foo', line: 6, def char: 14 TypeDef: no info @@ -41,7 +41,7 @@ On Hover: macro fun Macros::macros::foo($i: u64, $body: |u64| -> u64): u64 -- test 1 ------------------- -use line: 6, use_ndx: 1 +use line: 7, use_ndx: 1 Use: '$i', start: 18, end: 20 Def: '$i', line: 6, def char: 18 TypeDef: no info @@ -49,7 +49,7 @@ On Hover: $i: u64 -- test 2 ------------------- -use line: 6, use_ndx: 2 +use line: 7, use_ndx: 2 Use: '$body', start: 27, end: 32 Def: '$body', line: 6, def char: 27 TypeDef: no info @@ -57,7 +57,7 @@ On Hover: $body: |u64| -> u64 -- test 3 ------------------- -use line: 14, use_ndx: 0 +use line: 15, use_ndx: 0 Use: 'bar', start: 14, end: 17 Def: 'bar', line: 14, def char: 14 TypeDef: no info @@ -65,7 +65,7 @@ On Hover: macro fun Macros::macros::bar($i: Macros::macros::SomeStruct, $body: |Macros::macros::SomeStruct| -> Macros::macros::SomeStruct): Macros::macros::SomeStruct -- test 4 ------------------- -use line: 14, use_ndx: 1 +use line: 15, use_ndx: 1 Use: '$i', start: 18, end: 20 Def: '$i', line: 14, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -73,7 +73,7 @@ On Hover: $i: Macros::macros::SomeStruct -- test 5 ------------------- -use line: 14, use_ndx: 2 +use line: 15, use_ndx: 2 Use: 'SomeStruct', start: 22, end: 32 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -83,7 +83,7 @@ public struct Macros::macros::SomeStruct has drop { } -- test 6 ------------------- -use line: 14, use_ndx: 3 +use line: 15, use_ndx: 3 Use: '$body', start: 34, end: 39 Def: '$body', line: 14, def char: 34 TypeDef: no info @@ -91,7 +91,7 @@ On Hover: $body: |Macros::macros::SomeStruct| -> Macros::macros::SomeStruct -- test 7 ------------------- -use line: 14, use_ndx: 4 +use line: 15, use_ndx: 4 Use: 'SomeStruct', start: 42, end: 52 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -101,7 +101,7 @@ public struct Macros::macros::SomeStruct has drop { } -- test 8 ------------------- -use line: 14, use_ndx: 5 +use line: 15, use_ndx: 5 Use: 'SomeStruct', start: 57, end: 67 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -111,7 +111,7 @@ public struct Macros::macros::SomeStruct has drop { } -- test 9 ------------------- -use line: 14, use_ndx: 6 +use line: 15, use_ndx: 6 Use: 'SomeStruct', start: 70, end: 80 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -121,7 +121,7 @@ public struct Macros::macros::SomeStruct has drop { } -- test 10 ------------------- -use line: 18, use_ndx: 0 +use line: 19, use_ndx: 0 Use: 'for_each', start: 14, end: 22 Def: 'for_each', line: 18, def char: 14 TypeDef: no info @@ -129,7 +129,7 @@ On Hover: macro fun Macros::macros::for_each<$T>($v: &vector<$T>, $body: |&$T| -> ()) -- test 11 ------------------- -use line: 18, use_ndx: 1 +use line: 19, use_ndx: 1 Use: '$T', start: 23, end: 25 Def: '$T', line: 18, def char: 23 TypeDef: no info @@ -137,7 +137,7 @@ On Hover: $T -- test 12 ------------------- -use line: 18, use_ndx: 2 +use line: 19, use_ndx: 2 Use: '$v', start: 27, end: 29 Def: '$v', line: 18, def char: 27 TypeDef: no info @@ -145,7 +145,7 @@ On Hover: let $v: &vector -- test 13 ------------------- -use line: 18, use_ndx: 3 +use line: 19, use_ndx: 3 Use: '$T', start: 39, end: 41 Def: '$T', line: 18, def char: 23 TypeDef: no info @@ -153,7 +153,7 @@ On Hover: $T -- test 14 ------------------- -use line: 18, use_ndx: 4 +use line: 19, use_ndx: 4 Use: '$body', start: 44, end: 49 Def: '$body', line: 18, def char: 44 TypeDef: no info @@ -161,7 +161,7 @@ On Hover: $body: |&$T| -> () -- test 15 ------------------- -use line: 18, use_ndx: 5 +use line: 19, use_ndx: 5 Use: '$T', start: 53, end: 55 Def: '$T', line: 18, def char: 23 TypeDef: no info @@ -169,7 +169,7 @@ On Hover: $T -- test 16 ------------------- -use line: 32, use_ndx: 0 +use line: 33, use_ndx: 0 Use: 'macros', start: 16, end: 22 Def: 'macros', line: 0, def char: 15 TypeDef: no info @@ -177,7 +177,7 @@ On Hover: module Macros::macros -- test 17 ------------------- -use line: 32, use_ndx: 1 +use line: 33, use_ndx: 1 Use: 'foo', start: 24, end: 27 Def: 'foo', line: 6, def char: 14 TypeDef: no info @@ -185,7 +185,7 @@ On Hover: macro fun Macros::macros::foo($i: u64, $body: |u64| -> u64): u64 -- test 18 ------------------- -use line: 32, use_ndx: 2 +use line: 33, use_ndx: 2 Use: 'p', start: 29, end: 30 Def: 'p', line: 31, def char: 12 TypeDef: no info @@ -193,7 +193,7 @@ On Hover: let p: u64 -- test 19 ------------------- -use line: 32, use_ndx: 3 +use line: 33, use_ndx: 3 Use: 'x', start: 33, end: 34 Def: 'x', line: 32, def char: 33 TypeDef: no info @@ -201,7 +201,7 @@ On Hover: let x: u64 -- test 20 ------------------- -use line: 32, use_ndx: 4 +use line: 33, use_ndx: 4 Use: 'x', start: 36, end: 37 Def: 'x', line: 32, def char: 33 TypeDef: no info @@ -209,7 +209,7 @@ On Hover: let x: u64 -- test 21 ------------------- -use line: 37, use_ndx: 5 +use line: 38, use_ndx: 5 Use: 'y', start: 49, end: 50 Def: 'y', line: 37, def char: 49 TypeDef: no info @@ -217,7 +217,7 @@ On Hover: let y: u64 -- test 22 ------------------- -use line: 37, use_ndx: 7 +use line: 38, use_ndx: 7 Use: 'foo', start: 68, end: 71 Def: 'foo', line: 6, def char: 14 TypeDef: no info @@ -225,7 +225,7 @@ On Hover: macro fun Macros::macros::foo($i: u64, $body: |u64| -> u64): u64 -- test 23 ------------------- -use line: 37, use_ndx: 8 +use line: 38, use_ndx: 8 Use: 'y', start: 73, end: 74 Def: 'y', line: 37, def char: 49 TypeDef: no info @@ -233,7 +233,7 @@ On Hover: let y: u64 -- test 24 ------------------- -use line: 37, use_ndx: 9 +use line: 38, use_ndx: 9 Use: 'z', start: 77, end: 78 Def: 'z', line: 37, def char: 77 TypeDef: no info @@ -241,7 +241,7 @@ On Hover: let z: u64 -- test 25 ------------------- -use line: 37, use_ndx: 10 +use line: 38, use_ndx: 10 Use: 'z', start: 80, end: 81 Def: 'z', line: 37, def char: 77 TypeDef: no info @@ -249,7 +249,7 @@ On Hover: let z: u64 -- test 26 ------------------- -use line: 43, use_ndx: 4 +use line: 44, use_ndx: 4 Use: 'sum', start: 48, end: 51 Def: 'sum', line: 42, def char: 16 TypeDef: no info @@ -257,7 +257,7 @@ On Hover: let mut sum: u64 -- test 27 ------------------- -use line: 44, use_ndx: 0 +use line: 45, use_ndx: 0 Use: 'es', start: 8, end: 10 Def: 'es', line: 41, def char: 12 TypeDef: no info @@ -265,7 +265,7 @@ On Hover: let es: vector -- test 28 ------------------- -use line: 44, use_ndx: 1 +use line: 45, use_ndx: 1 Use: 'feach', start: 11, end: 16 Def: 'for_each', line: 18, def char: 14 TypeDef: no info @@ -273,7 +273,7 @@ On Hover: macro fun Macros::macros::for_each<$T>($v: &vector<$T>, $body: |&$T| -> ()) -- test 29 ------------------- -use line: 51, use_ndx: 2 +use line: 52, use_ndx: 2 Use: 'SomeStruct', start: 34, end: 44 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 diff --git a/external-crates/move/crates/move-analyzer/tests/macros.ide b/external-crates/move/crates/move-analyzer/tests/macros.ide index b239a90ca48ea..54891cd47d9a5 100644 --- a/external-crates/move/crates/move-analyzer/tests/macros.ide +++ b/external-crates/move/crates/move-analyzer/tests/macros.ide @@ -6,25 +6,25 @@ "fun_type.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 5, + "use_line": 6, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 0 } } @@ -32,181 +32,181 @@ "macros.move": [ { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 6 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 32, + "use_line": 33, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 5 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 7 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 8 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 9 } }, { "UseDefTest": { - "use_line": 37, + "use_line": 38, "use_ndx": 10 } }, { "UseDefTest": { - "use_line": 43, + "use_line": 44, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 44, + "use_line": 45, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 44, + "use_line": 45, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 51, + "use_line": 52, "use_ndx": 2 } } diff --git a/external-crates/move/crates/move-analyzer/tests/mod_access.exp b/external-crates/move/crates/move-analyzer/tests/mod_access.exp index bbd847d84e541..6296b548ccba4 100644 --- a/external-crates/move/crates/move-analyzer/tests/mod_access.exp +++ b/external-crates/move/crates/move-analyzer/tests/mod_access.exp @@ -1,6 +1,6 @@ == M9.move ======================================================== -- test 0 ------------------- -use line: 18, use_ndx: 1 +use line: 19, use_ndx: 1 Use: 'M9', start: 32, end: 34 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -11,7 +11,7 @@ A module doc comment -- test 1 ------------------- -use line: 19, use_ndx: 0 +use line: 20, use_ndx: 0 Use: 'M9', start: 17, end: 19 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -22,7 +22,7 @@ A module doc comment -- test 2 ------------------- -use line: 19, use_ndx: 3 +use line: 20, use_ndx: 3 Use: 'M9', start: 55, end: 57 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -33,7 +33,7 @@ A module doc comment -- test 3 ------------------- -use line: 22, use_ndx: 2 +use line: 23, use_ndx: 2 Use: 'M9', start: 34, end: 36 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -44,7 +44,7 @@ A module doc comment -- test 4 ------------------- -use line: 23, use_ndx: 0 +use line: 24, use_ndx: 0 Use: 'M9', start: 21, end: 23 Def: 'M9', line: 5, def char: 16 TypeDef: no info @@ -55,7 +55,7 @@ A module doc comment -- test 5 ------------------- -use line: 27, use_ndx: 2 +use line: 28, use_ndx: 2 Use: 'M1', start: 34, end: 36 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -63,7 +63,7 @@ On Hover: module Symbols::M1 -- test 6 ------------------- -use line: 27, use_ndx: 4 +use line: 28, use_ndx: 4 Use: 'ALIAS_M1', start: 51, end: 59 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -71,7 +71,7 @@ On Hover: module Symbols::M1 -- test 7 ------------------- -use line: 33, use_ndx: 1 +use line: 34, use_ndx: 1 Use: 'ANOTHER_ALIAS_M1', start: 17, end: 33 Def: 'M1', line: 0, def char: 16 TypeDef: no info @@ -79,7 +79,7 @@ On Hover: module Symbols::M1 -- test 8 ------------------- -use line: 33, use_ndx: 3 +use line: 34, use_ndx: 3 Use: 'M9', start: 57, end: 59 Def: 'M9', line: 5, def char: 16 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/mod_access.ide b/external-crates/move/crates/move-analyzer/tests/mod_access.ide index 283b9c8658731..00ad6c69cc55c 100644 --- a/external-crates/move/crates/move-analyzer/tests/mod_access.ide +++ b/external-crates/move/crates/move-analyzer/tests/mod_access.ide @@ -5,55 +5,55 @@ "M9.move": [ { "UseDefTest": { - "use_line": 18, + "use_line": 19, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 22, + "use_line": 23, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 27, + "use_line": 28, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 27, + "use_line": 28, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 33, + "use_line": 34, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 33, + "use_line": 34, "use_ndx": 3 } } diff --git a/external-crates/move/crates/move-analyzer/tests/parse_error.exp b/external-crates/move/crates/move-analyzer/tests/parse_error.exp index a01b1083f6095..532b2cab67384 100644 --- a/external-crates/move/crates/move-analyzer/tests/parse_error.exp +++ b/external-crates/move/crates/move-analyzer/tests/parse_error.exp @@ -1,6 +1,6 @@ == M1.move ======================================================== -- test 0 ------------------- -use line: 8, use_ndx: 0 +use line: 9, use_ndx: 0 Use: 'c', start: 10, end: 11 Def: 'c', line: 8, def char: 10 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: const ParseError::M1::c: u64 = 7 -- test 1 ------------------- -use line: 14, use_ndx: 0 +use line: 15, use_ndx: 0 Use: 'c', start: 10, end: 11 Def: 'c', line: 14, def char: 10 TypeDef: no info @@ -16,7 +16,7 @@ On Hover: const ParseError::M3::c: u64 = 7 -- test 2 ------------------- -use line: 21, use_ndx: 0 +use line: 22, use_ndx: 0 Use: 'c', start: 10, end: 11 Def: 'c', line: 21, def char: 10 TypeDef: no info @@ -25,7 +25,7 @@ const ParseError::M4::c: u64 = 7 == M2.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'SomeStruct', start: 11, end: 21 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 diff --git a/external-crates/move/crates/move-analyzer/tests/parse_error.ide b/external-crates/move/crates/move-analyzer/tests/parse_error.ide index 10d7a9f62d9d4..8d7c71d898615 100644 --- a/external-crates/move/crates/move-analyzer/tests/parse_error.ide +++ b/external-crates/move/crates/move-analyzer/tests/parse_error.ide @@ -7,19 +7,19 @@ "M1.move": [ { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 21, + "use_line": 22, "use_ndx": 0 } } @@ -27,7 +27,7 @@ "M2.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } } diff --git a/external-crates/move/crates/move-analyzer/tests/parse_error_dep.exp b/external-crates/move/crates/move-analyzer/tests/parse_error_dep.exp index 2e2e5508175cc..4d89cfa4168c3 100644 --- a/external-crates/move/crates/move-analyzer/tests/parse_error_dep.exp +++ b/external-crates/move/crates/move-analyzer/tests/parse_error_dep.exp @@ -1,6 +1,6 @@ == M2.move ======================================================== -- test 0 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'fun_call', start: 15, end: 23 Def: 'fun_call', line: 4, def char: 15 TypeDef: no info @@ -8,7 +8,7 @@ On Hover: public fun ParseErrorDep::M2::fun_call(): u64 -- test 1 ------------------- -use line: 8, use_ndx: 1 +use line: 9, use_ndx: 1 Use: 's', start: 29, end: 30 Def: 's', line: 8, def char: 29 TypeDef: 'SomeStruct', line: 2, char: 11 diff --git a/external-crates/move/crates/move-analyzer/tests/parse_error_dep.ide b/external-crates/move/crates/move-analyzer/tests/parse_error_dep.ide index 5ef732b7ff45d..1a3165c758a66 100644 --- a/external-crates/move/crates/move-analyzer/tests/parse_error_dep.ide +++ b/external-crates/move/crates/move-analyzer/tests/parse_error_dep.ide @@ -6,13 +6,13 @@ "M2.move": [ { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 1 } } diff --git a/external-crates/move/crates/move-analyzer/tests/partial_dot.exp b/external-crates/move/crates/move-analyzer/tests/partial_dot.exp index aca802f4d3e88..e1c5836357ff3 100644 --- a/external-crates/move/crates/move-analyzer/tests/partial_dot.exp +++ b/external-crates/move/crates/move-analyzer/tests/partial_dot.exp @@ -1,6 +1,6 @@ == M1.move ======================================================== -- test 0 ------------------- -use line: 10, use_ndx: 1 +use line: 11, use_ndx: 1 Use: 's', start: 20, end: 21 Def: 's', line: 9, def char: 12 TypeDef: 'AnotherStruct', line: 5, char: 18 @@ -8,7 +8,7 @@ On Hover: s: PartialDot::M1::AnotherStruct -- test 1 ------------------- -use line: 11, use_ndx: 1 +use line: 12, use_ndx: 1 Use: 's', start: 20, end: 21 Def: 's', line: 9, def char: 12 TypeDef: 'AnotherStruct', line: 5, char: 18 @@ -16,7 +16,7 @@ On Hover: s: PartialDot::M1::AnotherStruct -- test 2 ------------------- -use line: 11, use_ndx: 2 +use line: 12, use_ndx: 2 Use: 'another_field', start: 22, end: 35 Def: 'another_field', line: 6, def char: 8 TypeDef: 'SomeStruct', line: 1, char: 18 @@ -25,7 +25,7 @@ PartialDot::M1::AnotherStruct another_field: PartialDot::M1::SomeStruct -- test 3 ------------------- -use line: 12, use_ndx: 2 +use line: 13, use_ndx: 2 Use: 'another_field', start: 22, end: 35 Def: 'another_field', line: 6, def char: 8 TypeDef: 'SomeStruct', line: 1, char: 18 @@ -34,7 +34,7 @@ PartialDot::M1::AnotherStruct another_field: PartialDot::M1::SomeStruct -- test 4 ------------------- -use line: 14, use_ndx: 2 +use line: 15, use_ndx: 2 Use: 'another_field', start: 22, end: 35 Def: 'another_field', line: 6, def char: 8 TypeDef: 'SomeStruct', line: 1, char: 18 @@ -43,7 +43,7 @@ PartialDot::M1::AnotherStruct another_field: PartialDot::M1::SomeStruct -- test 5 ------------------- -use line: 15, use_ndx: 1 +use line: 16, use_ndx: 1 Use: 's', start: 20, end: 21 Def: 's', line: 9, def char: 12 TypeDef: 'AnotherStruct', line: 5, char: 18 diff --git a/external-crates/move/crates/move-analyzer/tests/partial_dot.ide b/external-crates/move/crates/move-analyzer/tests/partial_dot.ide index f35fc68005604..4898a1db882e8 100644 --- a/external-crates/move/crates/move-analyzer/tests/partial_dot.ide +++ b/external-crates/move/crates/move-analyzer/tests/partial_dot.ide @@ -5,37 +5,37 @@ "M1.move": [ { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 11, + "use_line": 12, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 11, + "use_line": 12, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 12, + "use_line": 13, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 14, + "use_line": 15, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 1 } } diff --git a/external-crates/move/crates/move-analyzer/tests/partial_function.exp b/external-crates/move/crates/move-analyzer/tests/partial_function.exp index 9a295f22b3391..63dea83d8025e 100644 --- a/external-crates/move/crates/move-analyzer/tests/partial_function.exp +++ b/external-crates/move/crates/move-analyzer/tests/partial_function.exp @@ -1,6 +1,6 @@ == M1.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'INVALID USE IDENT', start: 8, end: 17 Def: 'just_name', line: 2, def char: 8 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/partial_function.ide b/external-crates/move/crates/move-analyzer/tests/partial_function.ide index 49da5ab9a9fc7..62eae429bfe24 100644 --- a/external-crates/move/crates/move-analyzer/tests/partial_function.ide +++ b/external-crates/move/crates/move-analyzer/tests/partial_function.ide @@ -5,7 +5,7 @@ "M1.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } } diff --git a/external-crates/move/crates/move-analyzer/tests/pretype_error.exp b/external-crates/move/crates/move-analyzer/tests/pretype_error.exp index 05f89374b5a93..ed2e0c95969fb 100644 --- a/external-crates/move/crates/move-analyzer/tests/pretype_error.exp +++ b/external-crates/move/crates/move-analyzer/tests/pretype_error.exp @@ -1,6 +1,6 @@ == M2.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'SomeStruct', start: 11, end: 21 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 diff --git a/external-crates/move/crates/move-analyzer/tests/pretype_error.ide b/external-crates/move/crates/move-analyzer/tests/pretype_error.ide index ad035c1aaedc5..fcefecf8228dd 100644 --- a/external-crates/move/crates/move-analyzer/tests/pretype_error.ide +++ b/external-crates/move/crates/move-analyzer/tests/pretype_error.ide @@ -6,7 +6,7 @@ "M2.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } } diff --git a/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.exp b/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.exp index 5559ddfb8abbf..a02db63719252 100644 --- a/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.exp +++ b/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.exp @@ -1,6 +1,6 @@ == M1.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'SomeStruct', start: 11, end: 21 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -10,7 +10,7 @@ struct PreTypeErrorDep::M1::SomeStruct { } -- test 1 ------------------- -use line: 12, use_ndx: 0 +use line: 13, use_ndx: 0 Use: 'wrong', start: 8, end: 13 Def: 'wrong', line: 12, def char: 8 TypeDef: no info @@ -19,7 +19,7 @@ fun PreTypeErrorDep::M1::wrong(): address == M2.move ======================================================== -- test 0 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'fun_call', start: 15, end: 23 Def: 'fun_call', line: 4, def char: 15 TypeDef: no info @@ -27,7 +27,7 @@ On Hover: public fun PreTypeErrorDep::M2::fun_call(): u64 -- test 1 ------------------- -use line: 8, use_ndx: 1 +use line: 9, use_ndx: 1 Use: 's', start: 29, end: 30 Def: 's', line: 8, def char: 29 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -35,7 +35,7 @@ On Hover: s: PreTypeErrorDep::M1::SomeStruct -- test 2 ------------------- -use line: 5, use_ndx: 1 +use line: 6, use_ndx: 1 Use: 'foo', start: 29, end: 32 Def: 'foo', line: 6, def char: 15 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.ide b/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.ide index 575664d026fcc..fa13bdc7a6fc1 100644 --- a/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.ide +++ b/external-crates/move/crates/move-analyzer/tests/pretype_error_dep.ide @@ -7,13 +7,13 @@ "M1.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 12, + "use_line": 13, "use_ndx": 0 } } @@ -21,19 +21,19 @@ "M2.move": [ { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 8, + "use_line": 9, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 5, + "use_line": 6, "use_ndx": 1 } } diff --git a/external-crates/move/crates/move-analyzer/tests/structs.exp b/external-crates/move/crates/move-analyzer/tests/structs.exp index dd3631a49aa37..628947df92668 100644 --- a/external-crates/move/crates/move-analyzer/tests/structs.exp +++ b/external-crates/move/crates/move-analyzer/tests/structs.exp @@ -1,6 +1,6 @@ == structs.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'SomeStruct', start: 18, end: 28 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -8,7 +8,7 @@ On Hover: public struct Move2024::structs::SomeStruct has copy, drop {} -- test 1 ------------------- -use line: 4, use_ndx: 0 +use line: 5, use_ndx: 0 Use: 'Positional', start: 18, end: 28 Def: 'Positional', line: 4, def char: 18 TypeDef: 'Positional', line: 4, char: 18 @@ -19,7 +19,7 @@ public struct Move2024::structs::Positional has copy, drop { } -- test 2 ------------------- -use line: 4, use_ndx: 1 +use line: 5, use_ndx: 1 Use: 'SomeStruct', start: 34, end: 44 Def: 'SomeStruct', line: 2, def char: 18 TypeDef: 'SomeStruct', line: 2, char: 18 @@ -27,7 +27,7 @@ On Hover: public struct Move2024::structs::SomeStruct has copy, drop {} -- test 3 ------------------- -use line: 6, use_ndx: 1 +use line: 7, use_ndx: 1 Use: 'positional', start: 19, end: 29 Def: 'positional', line: 6, def char: 19 TypeDef: 'Positional', line: 4, char: 18 @@ -35,7 +35,7 @@ On Hover: positional: Move2024::structs::Positional -- test 4 ------------------- -use line: 6, use_ndx: 2 +use line: 7, use_ndx: 2 Use: 'Positional', start: 31, end: 41 Def: 'Positional', line: 4, def char: 18 TypeDef: 'Positional', line: 4, char: 18 @@ -46,7 +46,7 @@ public struct Move2024::structs::Positional has copy, drop { } -- test 5 ------------------- -use line: 7, use_ndx: 1 +use line: 8, use_ndx: 1 Use: '0', start: 20, end: 21 Def: 'u64', line: 4, def char: 29 TypeDef: no info @@ -55,7 +55,7 @@ Move2024::structs::Positional 0: u64 -- test 6 ------------------- -use line: 7, use_ndx: 3 +use line: 8, use_ndx: 3 Use: '1', start: 34, end: 35 Def: 'SomeStruct', line: 4, def char: 34 TypeDef: 'SomeStruct', line: 2, char: 18 diff --git a/external-crates/move/crates/move-analyzer/tests/structs.ide b/external-crates/move/crates/move-analyzer/tests/structs.ide index fb3846615e388..8742064fecac7 100644 --- a/external-crates/move/crates/move-analyzer/tests/structs.ide +++ b/external-crates/move/crates/move-analyzer/tests/structs.ide @@ -6,43 +6,43 @@ "structs.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 3 } } diff --git a/external-crates/move/crates/move-analyzer/tests/symbols.exp b/external-crates/move/crates/move-analyzer/tests/symbols.exp index 878ee53c17f30..7e06c2c210085 100644 --- a/external-crates/move/crates/move-analyzer/tests/symbols.exp +++ b/external-crates/move/crates/move-analyzer/tests/symbols.exp @@ -1,6 +1,6 @@ == M1.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 0 +use line: 3, use_ndx: 0 Use: 'SomeStruct', start: 11, end: 21 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -10,7 +10,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 1 ------------------- -use line: 6, use_ndx: 0 +use line: 7, use_ndx: 0 Use: 'SOME_CONST', start: 10, end: 20 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -18,7 +18,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 2 ------------------- -use line: 9, use_ndx: 0 +use line: 10, use_ndx: 0 Use: 'unpack', start: 8, end: 14 Def: 'unpack', line: 9, def char: 8 TypeDef: no info @@ -26,7 +26,7 @@ On Hover: fun Symbols::M1::unpack(s: Symbols::M1::SomeStruct): u64 -- test 3 ------------------- -use line: 9, use_ndx: 1 +use line: 10, use_ndx: 1 Use: 's', start: 15, end: 16 Def: 's', line: 9, def char: 15 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -34,7 +34,7 @@ On Hover: s: Symbols::M1::SomeStruct -- test 4 ------------------- -use line: 9, use_ndx: 2 +use line: 10, use_ndx: 2 Use: 'SomeStruct', start: 18, end: 28 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -44,7 +44,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 5 ------------------- -use line: 10, use_ndx: 0 +use line: 11, use_ndx: 0 Use: 'SomeStruct', start: 12, end: 22 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -54,7 +54,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 6 ------------------- -use line: 10, use_ndx: 1 +use line: 11, use_ndx: 1 Use: 'some_field', start: 25, end: 35 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -63,7 +63,7 @@ Symbols::M1::SomeStruct some_field: u64 -- test 7 ------------------- -use line: 10, use_ndx: 2 +use line: 11, use_ndx: 2 Use: 'value', start: 37, end: 42 Def: 'value', line: 10, def char: 37 TypeDef: no info @@ -71,7 +71,7 @@ On Hover: value: u64 -- test 8 ------------------- -use line: 10, use_ndx: 3 +use line: 11, use_ndx: 3 Use: 's', start: 47, end: 48 Def: 's', line: 9, def char: 15 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -79,7 +79,7 @@ On Hover: s: Symbols::M1::SomeStruct -- test 9 ------------------- -use line: 15, use_ndx: 1 +use line: 16, use_ndx: 1 Use: 'value', start: 18, end: 23 Def: 'value', line: 14, def char: 11 TypeDef: no info @@ -87,7 +87,7 @@ On Hover: value: u64 -- test 10 ------------------- -use line: 19, use_ndx: 1 +use line: 20, use_ndx: 1 Use: 'SomeStruct', start: 16, end: 26 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -97,7 +97,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 11 ------------------- -use line: 20, use_ndx: 1 +use line: 21, use_ndx: 1 Use: 'SomeStruct', start: 18, end: 28 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -107,7 +107,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 12 ------------------- -use line: 20, use_ndx: 2 +use line: 21, use_ndx: 2 Use: 'some_field', start: 31, end: 41 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -116,7 +116,7 @@ Symbols::M1::SomeStruct some_field: u64 -- test 13 ------------------- -use line: 20, use_ndx: 3 +use line: 21, use_ndx: 3 Use: 'SOME_CONST', start: 43, end: 53 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -124,7 +124,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 14 ------------------- -use line: 24, use_ndx: 2 +use line: 25, use_ndx: 2 Use: 'SomeOtherStruct', start: 41, end: 56 Def: 'SomeOtherStruct', line: 2, def char: 11 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -134,7 +134,7 @@ struct Symbols::M2::SomeOtherStruct has drop { } -- test 15 ------------------- -use line: 25, use_ndx: 1 +use line: 26, use_ndx: 1 Use: 'some_other_struct', start: 21, end: 38 Def: 'some_other_struct', line: 6, def char: 15 TypeDef: no info @@ -142,7 +142,7 @@ On Hover: public fun Symbols::M2::some_other_struct(v: u64): Symbols::M2::SomeOtherStruct -- test 16 ------------------- -use line: 25, use_ndx: 2 +use line: 26, use_ndx: 2 Use: 'SOME_CONST', start: 39, end: 49 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -150,7 +150,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 17 ------------------- -use line: 30, use_ndx: 1 +use line: 31, use_ndx: 1 Use: 'SomeOtherStruct', start: 35, end: 50 Def: 'SomeOtherStruct', line: 2, def char: 11 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -160,7 +160,7 @@ struct Symbols::M2::SomeOtherStruct has drop { } -- test 18 ------------------- -use line: 34, use_ndx: 0 +use line: 35, use_ndx: 0 Use: 'acq', start: 8, end: 11 Def: 'acq', line: 34, def char: 8 TypeDef: no info @@ -168,7 +168,7 @@ On Hover: fun Symbols::M1::acq(uint: u64): u64 -- test 19 ------------------- -use line: 40, use_ndx: 2 +use line: 41, use_ndx: 2 Use: 'SOME_CONST', start: 22, end: 32 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -176,7 +176,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 20 ------------------- -use line: 40, use_ndx: 3 +use line: 41, use_ndx: 3 Use: 'SOME_CONST', start: 34, end: 44 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -184,7 +184,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 21 ------------------- -use line: 43, use_ndx: 0 +use line: 44, use_ndx: 0 Use: 'vec', start: 8, end: 11 Def: 'vec', line: 43, def char: 8 TypeDef: no info @@ -192,7 +192,7 @@ On Hover: fun Symbols::M1::vec(): vector -- test 22 ------------------- -use line: 45, use_ndx: 0 +use line: 46, use_ndx: 0 Use: 'SomeStruct', start: 15, end: 25 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -202,7 +202,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 23 ------------------- -use line: 45, use_ndx: 1 +use line: 46, use_ndx: 1 Use: 'SomeStruct', start: 27, end: 37 Def: 'SomeStruct', line: 2, def char: 11 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -212,7 +212,7 @@ struct Symbols::M1::SomeStruct has drop, store, key { } -- test 24 ------------------- -use line: 45, use_ndx: 2 +use line: 46, use_ndx: 2 Use: 'some_field', start: 39, end: 49 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -221,7 +221,7 @@ Symbols::M1::SomeStruct some_field: u64 -- test 25 ------------------- -use line: 45, use_ndx: 3 +use line: 46, use_ndx: 3 Use: 's', start: 57, end: 58 Def: 's', line: 44, def char: 12 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -229,7 +229,7 @@ On Hover: let s: Symbols::M1::SomeStruct -- test 26 ------------------- -use line: 56, use_ndx: 1 +use line: 57, use_ndx: 1 Use: 'tmp', start: 21, end: 24 Def: 'tmp', line: 55, def char: 12 TypeDef: no info @@ -237,7 +237,7 @@ On Hover: let tmp: u64 -- test 27 ------------------- -use line: 57, use_ndx: 0 +use line: 58, use_ndx: 0 Use: 'r', start: 9, end: 10 Def: 'r', line: 56, def char: 12 TypeDef: no info @@ -245,7 +245,7 @@ On Hover: let r: &mut u64 -- test 28 ------------------- -use line: 57, use_ndx: 1 +use line: 58, use_ndx: 1 Use: 'SOME_CONST', start: 13, end: 23 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -253,7 +253,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 29 ------------------- -use line: 61, use_ndx: 0 +use line: 62, use_ndx: 0 Use: 'ret', start: 8, end: 11 Def: 'ret', line: 61, def char: 8 TypeDef: no info @@ -261,7 +261,7 @@ On Hover: fun Symbols::M1::ret(p1: bool, p2: u64): u64 -- test 30 ------------------- -use line: 63, use_ndx: 0 +use line: 64, use_ndx: 0 Use: 'INVALID USE IDENT', start: 19, end: 29 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -269,7 +269,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 31 ------------------- -use line: 68, use_ndx: 0 +use line: 69, use_ndx: 0 Use: 'abort_call', start: 8, end: 18 Def: 'abort_call', line: 68, def char: 8 TypeDef: no info @@ -277,7 +277,7 @@ On Hover: fun Symbols::M1::abort_call() -- test 32 ------------------- -use line: 69, use_ndx: 0 +use line: 70, use_ndx: 0 Use: 'INVALID USE IDENT', start: 14, end: 24 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -285,7 +285,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 33 ------------------- -use line: 75, use_ndx: 0 +use line: 76, use_ndx: 0 Use: 'INVALID USE IDENT', start: 9, end: 10 Def: 'r', line: 74, def char: 12 TypeDef: no info @@ -293,7 +293,7 @@ On Hover: let r: &u64 -- test 34 ------------------- -use line: 79, use_ndx: 0 +use line: 80, use_ndx: 0 Use: 'INVALID USE IDENT', start: 9, end: 10 Def: 'p', line: 78, def char: 14 TypeDef: no info @@ -301,7 +301,7 @@ On Hover: p: bool -- test 35 ------------------- -use line: 83, use_ndx: 1 +use line: 84, use_ndx: 1 Use: 'SOME_CONST', start: 19, end: 29 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -309,7 +309,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 36 ------------------- -use line: 94, use_ndx: 0 +use line: 95, use_ndx: 0 Use: 'outer', start: 8, end: 13 Def: 'outer', line: 93, def char: 12 TypeDef: 'OuterStruct', line: 87, char: 11 @@ -317,7 +317,7 @@ On Hover: let outer: Symbols::M1::OuterStruct -- test 37 ------------------- -use line: 94, use_ndx: 1 +use line: 95, use_ndx: 1 Use: 'some_struct', start: 14, end: 25 Def: 'some_struct', line: 88, def char: 8 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -326,7 +326,7 @@ Symbols::M1::OuterStruct some_struct: Symbols::M1::SomeStruct -- test 38 ------------------- -use line: 94, use_ndx: 2 +use line: 95, use_ndx: 2 Use: 'INVALID USE IDENT', start: 26, end: 36 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -335,7 +335,7 @@ Symbols::M1::SomeStruct some_field: u64 -- test 39 ------------------- -use line: 102, use_ndx: 0 +use line: 103, use_ndx: 0 Use: 'some_struct', start: 10, end: 21 Def: 'some_struct', line: 88, def char: 8 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -344,7 +344,7 @@ Symbols::M1::OuterStruct some_struct: Symbols::M1::SomeStruct -- test 40 ------------------- -use line: 108, use_ndx: 1 +use line: 109, use_ndx: 1 Use: 'outer', start: 17, end: 22 Def: 'outer', line: 107, def char: 12 TypeDef: 'OuterStruct', line: 87, char: 11 @@ -352,7 +352,7 @@ On Hover: let outer: Symbols::M1::OuterStruct -- test 41 ------------------- -use line: 108, use_ndx: 2 +use line: 109, use_ndx: 2 Use: 'some_struct', start: 23, end: 34 Def: 'some_struct', line: 88, def char: 8 TypeDef: 'SomeStruct', line: 2, char: 11 @@ -361,7 +361,7 @@ Symbols::M1::OuterStruct some_struct: Symbols::M1::SomeStruct -- test 42 ------------------- -use line: 108, use_ndx: 3 +use line: 109, use_ndx: 3 Use: 'some_field', start: 35, end: 45 Def: 'some_field', line: 3, def char: 8 TypeDef: no info @@ -370,7 +370,7 @@ Symbols::M1::SomeStruct some_field: u64 -- test 43 ------------------- -use line: 114, use_ndx: 0 +use line: 115, use_ndx: 0 Use: 'tmp', start: 9, end: 12 Def: 'tmp', line: 113, def char: 12 TypeDef: no info @@ -378,7 +378,7 @@ On Hover: let tmp: u128 -- test 44 ------------------- -use line: 118, use_ndx: 1 +use line: 119, use_ndx: 1 Use: 'SOME_CONST', start: 19, end: 29 Def: 'SOME_CONST', line: 6, def char: 10 TypeDef: no info @@ -386,7 +386,7 @@ On Hover: const Symbols::M1::SOME_CONST: u64 = 42 -- test 45 ------------------- -use line: 122, use_ndx: 1 +use line: 123, use_ndx: 1 Use: 'p', start: 21, end: 22 Def: 'p', line: 122, def char: 21 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -394,7 +394,7 @@ On Hover: p: Symbols::M2::SomeOtherStruct -- test 46 ------------------- -use line: 123, use_ndx: 0 +use line: 124, use_ndx: 0 Use: 'INVALID USE IDENT', start: 8, end: 9 Def: 'p', line: 122, def char: 21 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -402,7 +402,7 @@ On Hover: p: Symbols::M2::SomeOtherStruct -- test 47 ------------------- -use line: 127, use_ndx: 0 +use line: 128, use_ndx: 0 Use: 'tmp', start: 12, end: 15 Def: 'tmp', line: 127, def char: 12 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -410,7 +410,7 @@ On Hover: let tmp: Symbols::M2::SomeOtherStruct -- test 48 ------------------- -use line: 129, use_ndx: 0 +use line: 130, use_ndx: 0 Use: 'INVALID USE IDENT', start: 12, end: 15 Def: 'tmp', line: 127, def char: 12 TypeDef: 'SomeOtherStruct', line: 2, char: 11 @@ -419,7 +419,7 @@ let tmp: Symbols::M2::SomeOtherStruct == M3.move ======================================================== -- test 0 ------------------- -use line: 2, use_ndx: 1 +use line: 3, use_ndx: 1 Use: 'T', start: 23, end: 24 Def: 'T', line: 2, def char: 23 TypeDef: no info @@ -427,7 +427,7 @@ On Hover: T -- test 1 ------------------- -use line: 3, use_ndx: 1 +use line: 4, use_ndx: 1 Use: 'T', start: 20, end: 21 Def: 'T', line: 2, def char: 23 TypeDef: no info @@ -435,7 +435,7 @@ On Hover: T -- test 2 ------------------- -use line: 6, use_ndx: 1 +use line: 7, use_ndx: 1 Use: 'T', start: 23, end: 24 Def: 'T', line: 6, def char: 23 TypeDef: no info @@ -443,7 +443,7 @@ On Hover: T -- test 3 ------------------- -use line: 6, use_ndx: 2 +use line: 7, use_ndx: 2 Use: 'param', start: 39, end: 44 Def: 'param', line: 6, def char: 39 TypeDef: no info @@ -451,7 +451,7 @@ On Hover: param: T -- test 4 ------------------- -use line: 6, use_ndx: 3 +use line: 7, use_ndx: 3 Use: 'T', start: 46, end: 47 Def: 'T', line: 6, def char: 23 TypeDef: no info @@ -459,7 +459,7 @@ On Hover: T -- test 5 ------------------- -use line: 6, use_ndx: 4 +use line: 7, use_ndx: 4 Use: 'T', start: 50, end: 51 Def: 'T', line: 6, def char: 23 TypeDef: no info @@ -467,7 +467,7 @@ On Hover: T -- test 6 ------------------- -use line: 10, use_ndx: 4 +use line: 11, use_ndx: 4 Use: 'T', start: 52, end: 53 Def: 'T', line: 10, def char: 30 TypeDef: no info @@ -475,7 +475,7 @@ On Hover: T -- test 7 ------------------- -use line: 10, use_ndx: 6 +use line: 11, use_ndx: 6 Use: 'T', start: 69, end: 70 Def: 'T', line: 10, def char: 30 TypeDef: no info @@ -483,7 +483,7 @@ On Hover: T -- test 8 ------------------- -use line: 11, use_ndx: 0 +use line: 12, use_ndx: 0 Use: 'INVALID USE IDENT', start: 8, end: 13 Def: 'param', line: 10, def char: 33 TypeDef: 'ParamStruct', line: 2, char: 11 @@ -491,7 +491,7 @@ On Hover: param: Symbols::M3::ParamStruct -- test 9 ------------------- -use line: 15, use_ndx: 1 +use line: 16, use_ndx: 1 Use: 'T', start: 20, end: 21 Def: 'T', line: 14, def char: 24 TypeDef: no info @@ -499,7 +499,7 @@ On Hover: T -- test 10 ------------------- -use line: 23, use_ndx: 1 +use line: 24, use_ndx: 1 Use: 'ParamStruct', start: 20, end: 31 Def: 'ParamStruct', line: 2, def char: 11 TypeDef: 'ParamStruct', line: 2, char: 11 @@ -509,7 +509,7 @@ struct Symbols::M3::ParamStruct { } -- test 11 ------------------- -use line: 23, use_ndx: 2 +use line: 24, use_ndx: 2 Use: 'T', start: 32, end: 33 Def: 'T', line: 22, def char: 30 TypeDef: no info @@ -518,7 +518,7 @@ T == M4.move ======================================================== -- test 0 ------------------- -use line: 4, use_ndx: 1 +use line: 5, use_ndx: 1 Use: 'tmp', start: 18, end: 21 Def: 'tmp', line: 2, def char: 16 TypeDef: no info @@ -526,7 +526,7 @@ On Hover: tmp: u64 -- test 1 ------------------- -use line: 6, use_ndx: 1 +use line: 7, use_ndx: 1 Use: 'tmp', start: 22, end: 25 Def: 'tmp', line: 4, def char: 12 TypeDef: no info @@ -534,7 +534,7 @@ On Hover: let tmp: u64 -- test 2 ------------------- -use line: 7, use_ndx: 0 +use line: 8, use_ndx: 0 Use: 'INVALID USE IDENT', start: 12, end: 15 Def: 'tmp', line: 4, def char: 12 TypeDef: no info @@ -542,7 +542,7 @@ On Hover: let tmp: u64 -- test 3 ------------------- -use line: 10, use_ndx: 0 +use line: 11, use_ndx: 0 Use: 'INVALID USE IDENT', start: 12, end: 15 Def: 'tmp', line: 9, def char: 16 TypeDef: no info @@ -550,7 +550,7 @@ On Hover: let tmp: u64 -- test 4 ------------------- -use line: 20, use_ndx: 0 +use line: 21, use_ndx: 0 Use: 'tmp', start: 15, end: 18 Def: 'tmp', line: 18, def char: 12 TypeDef: no info @@ -558,7 +558,7 @@ On Hover: let tmp: u64 -- test 5 ------------------- -use line: 23, use_ndx: 1 +use line: 24, use_ndx: 1 Use: 'tmp', start: 26, end: 29 Def: 'tmp', line: 18, def char: 12 TypeDef: no info @@ -566,7 +566,7 @@ On Hover: let tmp: u64 -- test 6 ------------------- -use line: 24, use_ndx: 1 +use line: 25, use_ndx: 1 Use: 'tmp', start: 23, end: 26 Def: 'tmp', line: 23, def char: 20 TypeDef: no info @@ -574,7 +574,7 @@ On Hover: let tmp: u64 -- test 7 ------------------- -use line: 26, use_ndx: 0 +use line: 27, use_ndx: 0 Use: 'tmp', start: 12, end: 15 Def: 'tmp', line: 18, def char: 12 TypeDef: no info @@ -582,7 +582,7 @@ On Hover: let tmp: u64 -- test 8 ------------------- -use line: 40, use_ndx: 1 +use line: 41, use_ndx: 1 Use: 'tmp', start: 23, end: 26 Def: 'tmp', line: 39, def char: 20 TypeDef: no info @@ -590,7 +590,7 @@ On Hover: let tmp: u64 -- test 9 ------------------- -use line: 43, use_ndx: 0 +use line: 44, use_ndx: 0 Use: 'tmp', start: 16, end: 19 Def: 'tmp', line: 34, def char: 12 TypeDef: no info @@ -598,7 +598,7 @@ On Hover: let tmp: u64 -- test 10 ------------------- -use line: 55, use_ndx: 0 +use line: 56, use_ndx: 0 Use: 'SOME_CONST', start: 10, end: 20 Def: 'SOME_CONST', line: 55, def char: 10 TypeDef: no info diff --git a/external-crates/move/crates/move-analyzer/tests/symbols.ide b/external-crates/move/crates/move-analyzer/tests/symbols.ide index 14f7ed816e3d4..0f170b28df753 100644 --- a/external-crates/move/crates/move-analyzer/tests/symbols.ide +++ b/external-crates/move/crates/move-analyzer/tests/symbols.ide @@ -5,295 +5,295 @@ "M1.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 9, + "use_line": 10, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 19, + "use_line": 20, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 25, + "use_line": 26, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 25, + "use_line": 26, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 30, + "use_line": 31, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 34, + "use_line": 35, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 40, + "use_line": 41, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 40, + "use_line": 41, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 43, + "use_line": 44, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 45, + "use_line": 46, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 45, + "use_line": 46, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 45, + "use_line": 46, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 45, + "use_line": 46, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 56, + "use_line": 57, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 57, + "use_line": 58, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 57, + "use_line": 58, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 61, + "use_line": 62, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 63, + "use_line": 64, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 68, + "use_line": 69, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 69, + "use_line": 70, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 75, + "use_line": 76, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 79, + "use_line": 80, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 83, + "use_line": 84, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 94, + "use_line": 95, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 94, + "use_line": 95, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 94, + "use_line": 95, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 102, + "use_line": 103, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 108, + "use_line": 109, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 108, + "use_line": 109, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 108, + "use_line": 109, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 114, + "use_line": 115, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 118, + "use_line": 119, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 122, + "use_line": 123, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 123, + "use_line": 124, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 127, + "use_line": 128, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 129, + "use_line": 130, "use_ndx": 0 } } @@ -301,73 +301,73 @@ "M3.move": [ { "UseDefTest": { - "use_line": 2, + "use_line": 3, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 3, + "use_line": 4, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 2 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 3 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 4 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 6 } }, { "UseDefTest": { - "use_line": 11, + "use_line": 12, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 15, + "use_line": 16, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 2 } } @@ -375,67 +375,67 @@ "M4.move": [ { "UseDefTest": { - "use_line": 4, + "use_line": 5, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 6, + "use_line": 7, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 7, + "use_line": 8, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 10, + "use_line": 11, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 20, + "use_line": 21, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 23, + "use_line": 24, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 24, + "use_line": 25, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 26, + "use_line": 27, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 40, + "use_line": 41, "use_ndx": 1 } }, { "UseDefTest": { - "use_line": 43, + "use_line": 44, "use_ndx": 0 } }, { "UseDefTest": { - "use_line": 55, + "use_line": 56, "use_ndx": 0 } }