From ac8d321bb54710ec9663548bd16ee0aef1bbec61 Mon Sep 17 00:00:00 2001 From: peefy Date: Mon, 15 Jan 2024 10:51:03 +0800 Subject: [PATCH] fix: override str key test cases Signed-off-by: peefy --- kclvm/ast_pretty/src/node.rs | 2 +- kclvm/query/src/test_data/import_paths.k | 2 +- kclvm/query/src/tests.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kclvm/ast_pretty/src/node.rs b/kclvm/ast_pretty/src/node.rs index 2901fdf8a..a41b1ae97 100644 --- a/kclvm/ast_pretty/src/node.rs +++ b/kclvm/ast_pretty/src/node.rs @@ -862,7 +862,7 @@ impl<'p> Printer<'p> { self.write( &names .iter() - .map(|n| format!("{n:?}")) + .map(|n| format!("{:?}", n.node)) .collect::>() .join(": {"), ); diff --git a/kclvm/query/src/test_data/import_paths.k b/kclvm/query/src/test_data/import_paths.k index 45579d045..44d5c3a58 100644 --- a/kclvm/query/src/test_data/import_paths.k +++ b/kclvm/query/src/test_data/import_paths.k @@ -2,7 +2,7 @@ import pkg import pkg.pkg import pkg.pkg as alias_pkg1 import pkg.pkg as alias_pkg2 -import .relative_pkg +import relative_pkg schema Data: id?: int = 0 diff --git a/kclvm/query/src/tests.rs b/kclvm/query/src/tests.rs index 42b674371..d40d77580 100644 --- a/kclvm/query/src/tests.rs +++ b/kclvm/query/src/tests.rs @@ -108,7 +108,7 @@ appConfiguration = AppConfiguration { labels: { key: { key: "override_value" - Node { node: "str-key", filename: "", line: 1, column: 1, end_line: 1, end_column: 1 } = "override_value" + "str-key" = "override_value" } } mainContainer: Main {name: "override_name"}