Skip to content

Commit

Permalink
fix: net cidr functions and tests (kcl-lang#1816)
Browse files Browse the repository at this point in the history
Signed-off-by: Peefy <xpf6677@163.com>
  • Loading branch information
Peefy authored Jan 12, 2025
1 parent 420ebcc commit 2562e63
Show file tree
Hide file tree
Showing 10 changed files with 278 additions and 263 deletions.
6 changes: 3 additions & 3 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ impl KclvmServiceImpl {
/// assert_eq!(result.type_errors.len(), 0);
/// assert_eq!(result.symbols.len(), 12);
/// assert_eq!(result.scopes.len(), 3);
/// assert_eq!(result.node_symbol_map.len(), 183);
/// assert_eq!(result.symbol_node_map.len(), 183);
/// assert_eq!(result.fully_qualified_name_map.len(), 193);
/// assert_eq!(result.node_symbol_map.len(), 187);
/// assert_eq!(result.symbol_node_map.len(), 187);
/// assert_eq!(result.fully_qualified_name_map.len(), 197);
/// assert_eq!(result.pkg_scope_map.len(), 3);
/// ```
#[inline]
Expand Down
57 changes: 29 additions & 28 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_0.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: loader/src/tests.rs
expression: "format! (\"{:#?}\", p.symbols.values())"
snapshot_kind: text
---
[
SymbolInfo {
Expand Down Expand Up @@ -88,34 +89,6 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
Expand Down Expand Up @@ -298,6 +271,34 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
kind: Function,
},
SymbolRef {
id: Index {
index: 171,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 172,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 173,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 174,
generation: 0,
},
kind: Function,
},
],
is_global: false,
},
Expand Down
169 changes: 85 additions & 84 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_1.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: loader/src/tests.rs
expression: "format! (\"{:#?}\", p.symbols.values())"
snapshot_kind: text
---
[
SymbolInfo {
Expand Down Expand Up @@ -245,34 +246,6 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
Expand Down Expand Up @@ -455,6 +428,34 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
kind: Function,
},
SymbolRef {
id: Index {
index: 171,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 172,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 173,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 174,
generation: 0,
},
kind: Function,
},
],
is_global: false,
},
Expand Down Expand Up @@ -494,34 +495,6 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
Expand Down Expand Up @@ -704,6 +677,34 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
kind: Function,
},
SymbolRef {
id: Index {
index: 171,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 172,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 173,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 174,
generation: 0,
},
kind: Function,
},
],
is_global: false,
},
Expand Down Expand Up @@ -743,34 +744,6 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 141,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 142,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 143,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 144,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 145,
Expand Down Expand Up @@ -953,6 +926,34 @@ expression: "format! (\"{:#?}\", p.symbols.values())"
},
kind: Function,
},
SymbolRef {
id: Index {
index: 171,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 172,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 173,
generation: 0,
},
kind: Function,
},
SymbolRef {
id: Index {
index: 174,
generation: 0,
},
kind: Function,
},
],
is_global: false,
},
Expand Down
Loading

0 comments on commit 2562e63

Please sign in to comment.