From 12886242185dea589ebd4963e9f14bb557fe139b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 31 Jan 2022 15:18:49 +0800 Subject: [PATCH] lock insta version (#179) --- Cargo.lock | 4 ++-- nac3core/Cargo.toml | 2 +- ...plevel__test__test_analyze__analyze-2.snap | 14 -------------- ...plevel__test__test_analyze__analyze-3.snap | 15 --------------- ...plevel__test__test_analyze__analyze-4.snap | 17 ----------------- ...plevel__test__test_analyze__analyze-5.snap | 15 --------------- ...plevel__test__test_analyze__analyze-6.snap | 19 ------------------- ...toplevel__test__test_analyze__analyze.snap | 9 --------- ...el__test__test_analyze__generic_class.snap | 1 + ...t__test_analyze__inheritance_override.snap | 1 + ...est__test_analyze__list_tuple_generic.snap | 1 + ...__toplevel__test__test_analyze__self1.snap | 1 + ...t__test_analyze__simple_class_compose.snap | 1 + ...t__test_analyze__simple_pass_in_class.snap | 1 + nac3parser/Cargo.toml | 2 +- ...ac3parser__parser__tests__parse_empty.snap | 4 +++- 16 files changed, 13 insertions(+), 94 deletions(-) delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-2.snap delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-3.snap delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-4.snap delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-5.snap delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-6.snap delete mode 100644 nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze.snap diff --git a/Cargo.lock b/Cargo.lock index 47f488ad5..ce1a8898d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,9 +345,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c0c443f6dceb3a1cb7607c87501aa91e4b9c976044f725c2a74ca2152c91a4" +checksum = "da408b722765c64aad796c666b756aa1dda2a6c1b44f98797f2d8ea8f197746f" dependencies = [ "console", "once_cell", diff --git a/nac3core/Cargo.toml b/nac3core/Cargo.toml index ab11b7b90..ab51a8bc7 100644 --- a/nac3core/Cargo.toml +++ b/nac3core/Cargo.toml @@ -19,7 +19,7 @@ features = ["llvm13-0", "target-x86", "target-arm", "target-riscv", "no-libffi-l [dev-dependencies] test-case = "1.2.0" indoc = "1.0" -insta = "1.5" +insta = "=1.11.0" [build-dependencies] regex = "1" diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-2.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-2.snap deleted file mode 100644 index 73e317848..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-2.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Class {\nname: \"Generic_A\",\nancestors: [\"{class: Generic_A, params: [\\\"var6\\\"]}\", \"{class: B, params: []}\"],\nfields: [\"aa\", \"a\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"foo\", \"fn[[b=var5], none]\"), (\"fun\", \"fn[[a=int32], var6]\")],\ntype_vars: [\"var6\"]\n}\n", - "Function {\nname: \"Generic_A.__init__\",\nsig: \"fn[[], none]\",\nvar_id: [6]\n}\n", - "Function {\nname: \"Generic_A.fun\",\nsig: \"fn[[a=int32], var6]\",\nvar_id: [6]\n}\n", - "Class {\nname: \"B\",\nancestors: [\"{class: B, params: []}\"],\nfields: [\"aa\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"foo\", \"fn[[b=var5], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"B.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"B.foo\",\nsig: \"fn[[b=var5], none]\",\nvar_id: []\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-3.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-3.snap deleted file mode 100644 index 2b1f1eeb0..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-3.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Function {\nname: \"foo\",\nsig: \"fn[[a=list[int32], b=tuple[var5, float]], A[5->B, 6->bool]]\",\nvar_id: []\n}\n", - "Class {\nname: \"A\",\nancestors: [\"{class: A, params: [\\\"var5\\\", \\\"var6\\\"]}\"],\nfields: [\"a\", \"b\"],\nmethods: [(\"__init__\", \"fn[[v=var6], none]\"), (\"fun\", \"fn[[a=var5], var6]\")],\ntype_vars: [\"var5\", \"var6\"]\n}\n", - "Function {\nname: \"A.__init__\",\nsig: \"fn[[v=var6], none]\",\nvar_id: [6]\n}\n", - "Function {\nname: \"A.fun\",\nsig: \"fn[[a=var5], var6]\",\nvar_id: [6]\n}\n", - "Function {\nname: \"gfun\",\nsig: \"fn[[a=A[5->list[float], 6->int32]], none]\",\nvar_id: []\n}\n", - "Class {\nname: \"B\",\nancestors: [\"{class: B, params: []}\"],\nfields: [],\nmethods: [(\"__init__\", \"fn[[], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"B.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-4.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-4.snap deleted file mode 100644 index 97380a44a..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-4.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Class {\nname: \"A\",\nancestors: [\"{class: A, params: [\\\"var5\\\"]}\"],\nfields: [\"a\", \"b\", \"c\"],\nmethods: [(\"__init__\", \"fn[[t=var5], none]\"), (\"fun\", \"fn[[a=int32, b=var5], list[virtual[B[6->bool]]]]\"), (\"foo\", \"fn[[c=C], none]\")],\ntype_vars: [\"var5\"]\n}\n", - "Function {\nname: \"A.__init__\",\nsig: \"fn[[t=var5], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"A.fun\",\nsig: \"fn[[a=int32, b=var5], list[virtual[B[6->bool]]]]\",\nvar_id: []\n}\n", - "Function {\nname: \"A.foo\",\nsig: \"fn[[c=C], none]\",\nvar_id: []\n}\n", - "Class {\nname: \"B\",\nancestors: [\"{class: B, params: [\\\"var6\\\"]}\", \"{class: A, params: [\\\"float\\\"]}\"],\nfields: [\"a\", \"b\", \"c\", \"d\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[a=int32, b=var5], list[virtual[B[6->bool]]]]\"), (\"foo\", \"fn[[c=C], none]\")],\ntype_vars: [\"var6\"]\n}\n", - "Function {\nname: \"B.__init__\",\nsig: \"fn[[], none]\",\nvar_id: [6]\n}\n", - "Function {\nname: \"B.fun\",\nsig: \"fn[[a=int32, b=var5], list[virtual[B[6->bool]]]]\",\nvar_id: [6]\n}\n", - "Class {\nname: \"C\",\nancestors: [\"{class: C, params: []}\", \"{class: B, params: [\\\"bool\\\"]}\", \"{class: A, params: [\\\"float\\\"]}\"],\nfields: [\"a\", \"b\", \"c\", \"d\", \"e\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[a=int32, b=var5], list[virtual[B[6->bool]]]]\"), (\"foo\", \"fn[[c=C], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"C.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-5.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-5.snap deleted file mode 100644 index 472c45073..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-5.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Class {\nname: \"A\",\nancestors: [\"{class: A, params: [\\\"var5\\\", \\\"var6\\\"]}\"],\nfields: [\"a\", \"b\"],\nmethods: [(\"__init__\", \"fn[[a=A[5->float, 6->bool], b=B], none]\"), (\"fun\", \"fn[[a=A[5->float, 6->bool]], A[5->bool, 6->int32]]\")],\ntype_vars: [\"var5\", \"var6\"]\n}\n", - "Function {\nname: \"A.__init__\",\nsig: \"fn[[a=A[5->float, 6->bool], b=B], none]\",\nvar_id: [6]\n}\n", - "Function {\nname: \"A.fun\",\nsig: \"fn[[a=A[5->float, 6->bool]], A[5->bool, 6->int32]]\",\nvar_id: [6]\n}\n", - "Class {\nname: \"B\",\nancestors: [\"{class: B, params: []}\", \"{class: A, params: [\\\"int64\\\", \\\"bool\\\"]}\"],\nfields: [\"a\", \"b\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[a=A[5->float, 6->bool]], A[5->bool, 6->int32]]\"), (\"foo\", \"fn[[b=B], B]\"), (\"bar\", \"fn[[a=A[5->list[B], 6->int32]], tuple[A[5->virtual[A[5->B, 6->int32]], 6->bool], B]]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"B.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"B.foo\",\nsig: \"fn[[b=B], B]\",\nvar_id: []\n}\n", - "Function {\nname: \"B.bar\",\nsig: \"fn[[a=A[5->list[B], 6->int32]], tuple[A[5->virtual[A[5->B, 6->int32]], 6->bool], B]]\",\nvar_id: []\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-6.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-6.snap deleted file mode 100644 index b2bd46474..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze-6.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Class {\nname: \"A\",\nancestors: [\"{class: A, params: []}\"],\nfields: [\"a\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[b=B], none]\"), (\"foo\", \"fn[[a=var5, b=var6], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"A.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"A.fun\",\nsig: \"fn[[b=B], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"A.foo\",\nsig: \"fn[[a=var5, b=var6], none]\",\nvar_id: [6]\n}\n", - "Class {\nname: \"B\",\nancestors: [\"{class: B, params: []}\", \"{class: C, params: []}\", \"{class: A, params: []}\"],\nfields: [\"a\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[b=B], none]\"), (\"foo\", \"fn[[a=var5, b=var6], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"B.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", - "Class {\nname: \"C\",\nancestors: [\"{class: C, params: []}\", \"{class: A, params: []}\"],\nfields: [\"a\"],\nmethods: [(\"__init__\", \"fn[[], none]\"), (\"fun\", \"fn[[b=B], none]\"), (\"foo\", \"fn[[a=var5, b=var6], none]\")],\ntype_vars: []\n}\n", - "Function {\nname: \"C.__init__\",\nsig: \"fn[[], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"C.fun\",\nsig: \"fn[[b=B], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"foo\",\nsig: \"fn[[a=A], none]\",\nvar_id: []\n}\n", - "Function {\nname: \"ff\",\nsig: \"fn[[a=var5], var6]\",\nvar_id: [6]\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze.snap deleted file mode 100644 index d4e964454..000000000 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__analyze.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: nac3core/src/toplevel/test.rs -assertion_line: 541 -expression: res_vec - ---- -[ - "Class {\nname: \"A\",\nancestors: [\"{class: A, params: []}\"],\nfields: [],\nmethods: [],\ntype_vars: []\n}\n", -] diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__generic_class.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__generic_class.snap index f8d393665..73e317848 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__generic_class.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__generic_class.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__inheritance_override.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__inheritance_override.snap index 2067a56e5..97380a44a 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__inheritance_override.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__inheritance_override.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__list_tuple_generic.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__list_tuple_generic.snap index 7527143d6..2b1f1eeb0 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__list_tuple_generic.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__list_tuple_generic.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__self1.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__self1.snap index d6886ab23..472c45073 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__self1.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__self1.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_class_compose.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_class_compose.snap index ab0f0534f..b2bd46474 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_class_compose.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_class_compose.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_pass_in_class.snap b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_pass_in_class.snap index e9b204549..d4e964454 100644 --- a/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_pass_in_class.snap +++ b/nac3core/src/toplevel/snapshots/nac3core__toplevel__test__test_analyze__simple_pass_in_class.snap @@ -1,5 +1,6 @@ --- source: nac3core/src/toplevel/test.rs +assertion_line: 541 expression: res_vec --- diff --git a/nac3parser/Cargo.toml b/nac3parser/Cargo.toml index 926b2a29b..cbf0b9a3a 100644 --- a/nac3parser/Cargo.toml +++ b/nac3parser/Cargo.toml @@ -21,4 +21,4 @@ phf = { version = "0.9", features = ["macros"] } ahash = "0.7.2" [dev-dependencies] -insta = "1.5" +insta = "=1.11.0" diff --git a/nac3parser/src/snapshots/nac3parser__parser__tests__parse_empty.snap b/nac3parser/src/snapshots/nac3parser__parser__tests__parse_empty.snap index 64d89c15f..901b7242b 100644 --- a/nac3parser/src/snapshots/nac3parser__parser__tests__parse_empty.snap +++ b/nac3parser/src/snapshots/nac3parser__parser__tests__parse_empty.snap @@ -1,5 +1,7 @@ --- -source: parser/src/parser.rs +source: nac3parser/src/parser.rs +assertion_line: 90 expression: parse_ast + --- []