From bdb1e746bf6191a1686534d7473c8c5365db442c Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Tue, 5 Nov 2024 20:53:25 +0800 Subject: [PATCH] chore: goldens --- .../parser/mod/generics/expect_mir.json | 35 +++++++++++++------ .../parser/mod/methods/expect_mir.json | 28 ++++++++++----- .../mod/multi_input_file/expect_mir.json | 14 +++++--- .../mod/non_qualified_names/expect_mir.json | 14 +++++--- .../mod/qualified_names/expect_mir.json | 28 ++++++++++----- .../codegen/parser/mod/simple/expect_mir.json | 7 ++-- .../use_type_in_another_file/expect_mir.json | 7 ++-- 7 files changed, 95 insertions(+), 38 deletions(-) diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json index 19e3de3750..619ee4beeb 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/generics/expect_mir.json @@ -166,7 +166,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, @@ -219,7 +218,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_enum_bool", + "name": { + "dart_style": null, + "rust_style": "func_enum_bool" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -242,7 +245,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 2, "impl_mode": "Normal", "initializer": false, @@ -295,7 +297,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_enum_string", + "name": { + "dart_style": null, + "rust_style": "func_enum_string" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -318,7 +324,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 3, "impl_mode": "Normal", "initializer": false, @@ -371,7 +376,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_struct_bool", + "name": { + "dart_style": null, + "rust_style": "func_struct_bool" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -394,7 +403,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 4, "impl_mode": "Normal", "initializer": false, @@ -447,7 +455,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_struct_string", + "name": { + "dart_style": null, + "rust_style": "func_struct_string" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -470,7 +482,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 5, "impl_mode": "Normal", "initializer": false, @@ -523,7 +534,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_struct_string_repeated", + "name": { + "dart_style": null, + "rust_style": "func_struct_string_repeated" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json index 49afd97529..ee50932de5 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/methods/expect_mir.json @@ -54,7 +54,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, @@ -91,7 +90,11 @@ } ], "mode": "Normal", - "name": "crate::api/my_enum_example_instance_method", + "name": { + "dart_style": null, + "rust_style": "my_enum_example_instance_method" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -135,13 +138,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 2, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/my_enum_example_static_method", + "name": { + "dart_style": null, + "rust_style": "my_enum_example_static_method" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -185,7 +191,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 3, "impl_mode": "Normal", "initializer": false, @@ -224,7 +229,11 @@ } ], "mode": "Normal", - "name": "crate::api/my_struct_example_instance_method", + "name": { + "dart_style": null, + "rust_style": "my_struct_example_instance_method" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -263,13 +272,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 4, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/my_struct_example_static_method", + "name": { + "dart_style": null, + "rust_style": "my_struct_example_static_method" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_mir.json index cad870e321..4b00fe7da6 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/multi_input_file/expect_mir.json @@ -20,13 +20,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api_one/func_one", + "name": { + "dart_style": null, + "rust_style": "func_one" + }, + "namespace": "crate::api_one", "output": { "error": null, "normal": { @@ -49,13 +52,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 2, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api_two/func_two", + "name": { + "dart_style": null, + "rust_style": "func_two" + }, + "namespace": "crate::api_two", "output": { "error": null, "normal": { diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json index 48bf0833f6..4af1c2cd9c 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/non_qualified_names/expect_mir.json @@ -20,7 +20,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, @@ -73,7 +72,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_1", + "name": { + "dart_style": null, + "rust_style": "func_1" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -96,13 +99,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 2, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/func_anyhow_result", + "name": { + "dart_style": null, + "rust_style": "func_anyhow_result" + }, + "namespace": "crate::api", "output": { "error": { "data": "String", diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json index 0e904645bc..fe6ccfb63a 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/qualified_names/expect_mir.json @@ -20,7 +20,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, @@ -73,7 +72,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_1", + "name": { + "dart_style": null, + "rust_style": "func_1" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { @@ -96,13 +99,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 2, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/func_anyhow_result", + "name": { + "dart_style": null, + "rust_style": "func_anyhow_result" + }, + "namespace": "crate::api", "output": { "error": { "data": "String", @@ -129,13 +135,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 3, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/func_result", + "name": { + "dart_style": null, + "rust_style": "func_result" + }, + "namespace": "crate::api", "output": { "error": { "data": "String", @@ -162,13 +171,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 4, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/func_std_result_result", + "name": { + "dart_style": null, + "rust_style": "func_std_result_result" + }, + "namespace": "crate::api", "output": { "error": { "data": "String", diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_mir.json index 617936de2b..f2f1dfad43 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/simple/expect_mir.json @@ -20,13 +20,16 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, "inputs": [], "mode": "Normal", - "name": "crate::api/first_function", + "name": { + "dart_style": null, + "rust_style": "first_function" + }, + "namespace": "crate::api", "output": { "error": null, "normal": { diff --git a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json index 95ae0c43a2..bd50f45d5c 100644 --- a/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json +++ b/frb_codegen/test_fixtures/library/codegen/parser/mod/use_type_in_another_file/expect_mir.json @@ -42,7 +42,6 @@ "rust2dart": "Dco" }, "comments": [], - "dart_name": null, "id": 1, "impl_mode": "Normal", "initializer": false, @@ -111,7 +110,11 @@ } ], "mode": "Normal", - "name": "crate::api/func_one", + "name": { + "dart_style": null, + "rust_style": "func_one" + }, + "namespace": "crate::api", "output": { "error": null, "normal": {