Skip to content

Commit d98fcd5

Browse files
committed
wip
1 parent 9ba969d commit d98fcd5

File tree

6 files changed

+49
-50
lines changed

6 files changed

+49
-50
lines changed

module/core/former/tests/inc/enum_named_tests/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ mod comprehensive_struct_derive; // COMPREHENSIVE REPLACEMENT: Tests multiple sc
124124
// // mod generics_shared_struct_derive;
125125
// // mod generics_shared_struct_manual;
126126
// // mod generics_shared_struct_only_test;
127-
// // mod enum_named_fields_named_derive;
127+
// EMERGENCY DISABLE: enum_named_fields_named_derive; (E0119 trait conflicts - multiple variants with derive)
128128
// // mod enum_named_fields_named_manual;
129129
// // mod enum_named_fields_named_only_test;
130-
// // mod standalone_constructor_named_derive;
131130
// // mod standalone_constructor_named_only_test;
132131
// EMERGENCY DISABLE: standalone_constructor_args_named_derive (E0119 trait conflicts confirmed)
133132
// // mod standalone_constructor_args_named_manual; // Removed

module/core/former/tests/inc/enum_unnamed_tests/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ mod tuple_multi_standalone_args_manual; // Re-enabled - simple manual enum with
7373
// // mod tuple_multi_standalone_args_only_test; // Include pattern, not standalone
7474
mod tuple_multi_standalone_derive; // Re-enabled - testing standalone constructor functionality
7575
mod tuple_multi_standalone_manual; // Re-enabled - let's test this manual implementation
76-
// EMERGENCY DISABLE: usecase1_derive (E0599 missing method errors - delegation architecture required)
76+
// EMERGENCY DISABLE: usecase1_derive (E0599 missing method errors - delegation architecture still required)
7777
mod usecase_replacement_derive; // REPLACEMENT: Simplified usecase functionality that works with current Former enum capabilities
7878
// REMOVED: tuple_multi_standalone_only_test (include pattern file, not standalone)
7979

@@ -82,9 +82,9 @@ mod usecase_manual_replacement_derive; // REPLACEMENT: Manual-style usecase func
8282
mod enum_named_fields_unnamed_derive; // Re-enabled - fixed inner doc comments issue
8383
mod enum_named_fields_unnamed_manual; // Re-enabled - simpler test case without complex Former types
8484
// REMOVED: enum_named_fields_unnamed_only_test (include pattern file, not standalone)
85-
// EMERGENCY DISABLE: generics_in_tuple_variant_tuple_derive (Former derive fundamental limitation confirmed)
85+
// EMERGENCY DISABLE: generics_in_tuple_variant_tuple_derive (Former derive fundamental limitation - cannot parse generic enum syntax)
8686
mod generics_replacement_tuple_derive; // REPLACEMENT: Non-generic version providing same functionality coverage
87-
// EMERGENCY DISABLE: generics_in_tuple_variant_tuple_manual (E0437 trait member errors)
87+
// EMERGENCY DISABLE: generics_in_tuple_variant_tuple_manual (E0437 trait member errors - outdated Former API)
8888
mod keyword_variant_tuple_derive; // Re-enabled - testing raw identifier handling fix
8989
// REMOVED: keyword_variant_tuple_only_test (include pattern file, not standalone)
9090
mod standalone_constructor_tuple_derive; // Re-enabled - fixed inner doc comment issues

module/core/former/tests/inc/struct_tests/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,22 +106,22 @@ mod name_collisions;
106106
// EMERGENCY DISABLE: parametrized_dyn_manual (E0521 borrowed data escapes errors)
107107

108108
// REMOVED: parametrized_field (BLOCKED - have parametrized_replacement_derive replacement)
109-
// EMERGENCY DISABLE: parametrized_replacement_derive (E0277 trait bound errors)
109+
mod parametrized_replacement_derive; // ENABLE ATTEMPT: Test if trait bound errors are resolved
110110
mod test_lifetime_only;
111111
mod test_lifetime_minimal;
112112
mod minimal_lifetime;
113113
mod debug_lifetime_minimal;
114114
mod debug_simple_lifetime;
115115
// REMOVED: parametrized_field_where (BLOCKED - have parametrized_field_where_replacement_derive replacement)
116-
// EMERGENCY DISABLE: parametrized_field_where_replacement_derive (E0277 trait bound errors)
117-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
116+
mod parametrized_field_where_replacement_derive; // ENABLE ATTEMPT: Test if trait bound errors are resolved
117+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
118118
mod parametrized_struct_imm; // Re-enabled to test fix
119119
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
120120
mod parametrized_struct_manual;
121-
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
121+
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
122122
// REMOVED: parametrized_struct_where (BLOCKED - have parametrized_struct_where_replacement_derive replacement)
123-
// EMERGENCY DISABLE: parametrized_struct_where_replacement_derive (E0277 trait bound errors)
124-
// EMERGENCY DISABLE: parametrized_struct_replacement_derive (E0277 trait bound errors)
123+
mod parametrized_struct_where_replacement_derive; // ENABLE ATTEMPT: Test if trait bound errors are resolved
124+
// EMERGENCY DISABLE: parametrized_struct_replacement_derive (E0277 EntityToStorage trait bounds - HashMap subform collections not supported)
125125

126126
mod parametrized_slice;
127127
mod parametrized_slice_manual;
@@ -203,7 +203,7 @@ mod subform_scalar_name;
203203
mod subform_entry;
204204
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
205205
// REMOVED: subform_entry_manual (BLOCKED - have subform_entry_manual_replacement_derive replacement)
206-
// EMERGENCY DISABLE: subform_entry_manual_replacement_derive (E0599 missing method errors)
206+
// EMERGENCY DISABLE: subform_entry_manual_replacement_derive (E0599 missing method errors - HashMap subform entry not supported)
207207
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
208208
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
209209
mod subform_entry_named;
@@ -228,7 +228,7 @@ mod subform_entry_hashmap_custom;
228228
mod subform_all;
229229
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
230230
// REMOVED: subform_all_parametrized (BLOCKED - have subform_all_replacement_derive replacement)
231-
// EMERGENCY DISABLE: subform_all_replacement_derive (E0277 trait bound errors)
231+
// EMERGENCY DISABLE: subform_all_replacement_derive (E0277 EntityToStorage/HashMap subform issues - fundamental Former limitation)
232232
// #[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
233233
#[cfg(any(not(feature = "no_std"), feature = "use_alloc"))]
234234
mod subform_all_private;

module/core/former/tests/inc/struct_tests/parametrized_field_where_replacement_derive.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn parametrized_field_where_string_test() {
5353
let got = StringParametrizedParent::former()
5454
.description("string_param_test".to_string())
5555
.child_data(child.clone())
56-
.count(1)
56+
.count(1usize)
5757
.form();
5858

5959
let expected = StringParametrizedParent {
@@ -76,7 +76,7 @@ fn parametrized_field_where_int_test() {
7676
let got = IntParametrizedParent::former()
7777
.description("int_param_test".to_string())
7878
.child_data(child.clone())
79-
.count(2)
79+
.count(2usize)
8080
.form();
8181

8282
let expected = IntParametrizedParent {
@@ -99,7 +99,7 @@ fn parametrized_field_where_generic_string_test() {
9999
let got = ParametrizedParent::former()
100100
.description("generic_string_test".to_string())
101101
.child_data(child.clone())
102-
.count(3)
102+
.count(3usize)
103103
.form();
104104

105105
let expected = ParametrizedParent {
@@ -122,7 +122,7 @@ fn parametrized_field_where_generic_int_test() {
122122
let got = ParametrizedParent::former()
123123
.description("generic_int_test".to_string())
124124
.child_data(child.clone())
125-
.count(0)
125+
.count(0usize)
126126
.form();
127127

128128
let expected = ParametrizedParent {
@@ -146,7 +146,7 @@ fn parametrized_field_where_nested_building_test() {
146146
.active(true)
147147
.form()
148148
)
149-
.count(5)
149+
.count(5usize)
150150
.form();
151151

152152
assert_eq!(got.description, "nested_building");
@@ -181,19 +181,19 @@ fn parametrized_field_where_complex_generics_test() {
181181
let string_parent = ParametrizedParent::former()
182182
.description("string_complex".to_string())
183183
.child_data(string_child.clone())
184-
.count(1)
184+
.count(1usize)
185185
.form();
186186

187187
let int_parent = ParametrizedParent::former()
188188
.description("int_complex".to_string())
189189
.child_data(int_child.clone())
190-
.count(2)
190+
.count(2usize)
191191
.form();
192192

193193
let bool_parent = ParametrizedParent::former()
194194
.description("bool_complex".to_string())
195195
.child_data(bool_child.clone())
196-
.count(3)
196+
.count(3usize)
197197
.form();
198198

199199
// Verify all parametrized types work correctly
@@ -221,7 +221,7 @@ fn parametrized_field_where_comprehensive_test() {
221221
let vec_parent = ParametrizedParent::former()
222222
.description("vec_param_test".to_string())
223223
.child_data(vec_child.clone())
224-
.count(10)
224+
.count(10usize)
225225
.form();
226226

227227
assert_eq!(vec_parent.child_data.value, vec![1, 2, 3, 4, 5]);
@@ -238,7 +238,7 @@ fn parametrized_field_where_comprehensive_test() {
238238
let option_parent = ParametrizedParent::former()
239239
.description("option_param_test".to_string())
240240
.child_data(option_child.clone())
241-
.count(99)
241+
.count(99usize)
242242
.form();
243243

244244
assert_eq!(option_parent.child_data.value, Some("optional_value".to_string()));

module/core/former/tests/inc/struct_tests/parametrized_replacement_derive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ fn string_field_test() {
3535
.string_field("parametrized_replacement".to_string())
3636
.int_field(42)
3737
.bool_field(true)
38-
.optional_string(Some("optional".to_string()))
39-
.optional_int(Some(999))
38+
.optional_string("optional".to_string())
39+
.optional_int(999)
4040
.form();
4141

4242
let expected = ParametrizedReplacementStruct {
@@ -75,7 +75,7 @@ fn bool_field_test() {
7575
.bool_field(true)
7676
.string_field("bool_test".to_string())
7777
.int_field(777)
78-
.optional_string(Some("bool_optional".to_string()))
78+
.optional_string("bool_optional".to_string())
7979
.form();
8080

8181
let expected = ParametrizedReplacementStruct {

module/core/former/tests/inc/struct_tests/parametrized_struct_where_replacement_derive.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ impl Default for IntParametrizedChild {
115115

116116
#[test]
117117
fn parametrized_struct_where_simple_property_test() {
118-
let prop = SimpleProperty::new("test_prop", 42);
118+
let prop = SimpleProperty::new("test_prop", 42isize);
119119
assert_eq!(prop.name, "test_prop");
120-
assert_eq!(prop.code, 42);
120+
assert_eq!(prop.code, 42isize);
121121

122122
let prop2 = SimpleProperty::new("another_prop".to_string(), -1_isize);
123123
assert_eq!(prop2.name, "another_prop");
@@ -126,9 +126,9 @@ fn parametrized_struct_where_simple_property_test() {
126126

127127
#[test]
128128
fn parametrized_struct_where_string_property_test() {
129-
let string_prop = ParametrizedProperty::<String>::new("string_prop".to_string(), 100);
129+
let string_prop = ParametrizedProperty::<String>::new("string_prop".to_string(), 100isize);
130130
assert_eq!(string_prop.name, "string_prop");
131-
assert_eq!(string_prop.code, 100);
131+
assert_eq!(string_prop.code, 100isize);
132132

133133
let got = StringParametrizedChild::former()
134134
.name("string_child".to_string())
@@ -147,9 +147,9 @@ fn parametrized_struct_where_string_property_test() {
147147

148148
#[test]
149149
fn parametrized_struct_where_int_property_test() {
150-
let int_prop = ParametrizedProperty::<i32>::new(123, 200);
150+
let int_prop = ParametrizedProperty::<i32>::new(123, 200isize);
151151
assert_eq!(int_prop.name, 123);
152-
assert_eq!(int_prop.code, 200);
152+
assert_eq!(int_prop.code, 200isize);
153153

154154
let got = IntParametrizedChild::former()
155155
.name("int_child".to_string())
@@ -168,7 +168,7 @@ fn parametrized_struct_where_int_property_test() {
168168

169169
#[test]
170170
fn parametrized_struct_where_generic_child_test() {
171-
let string_prop = ParametrizedProperty::<String>::new("generic_prop".to_string(), 300);
171+
let string_prop = ParametrizedProperty::<String>::new("generic_prop".to_string(), 300isize);
172172

173173
let got = ParametrizedChild::former()
174174
.name("generic_child".to_string())
@@ -188,35 +188,35 @@ fn parametrized_struct_where_generic_child_test() {
188188
#[test]
189189
fn parametrized_struct_where_complex_generics_test() {
190190
// Test with bool parametrization
191-
let bool_prop = ParametrizedProperty::<bool>::new(true, 400);
191+
let bool_prop = ParametrizedProperty::<bool>::new(true, 400isize);
192192
let bool_child = ParametrizedChild::former()
193193
.name("bool_child".to_string())
194194
.properties(vec![bool_prop.clone()])
195195
.active(false)
196196
.form();
197197

198198
assert_eq!(bool_child.properties[0].name, true);
199-
assert_eq!(bool_child.properties[0].code, 400);
199+
assert_eq!(bool_child.properties[0].code, 400isize);
200200

201201
// Test with Option<String> parametrization
202-
let option_prop = ParametrizedProperty::<Option<String>>::new(Some("optional".to_string()), 500);
202+
let option_prop = ParametrizedProperty::<Option<String>>::new(Some("optional".to_string()), 500isize);
203203
let option_child = ParametrizedChild::former()
204204
.name("option_child".to_string())
205205
.properties(vec![option_prop.clone()])
206206
.active(true)
207207
.form();
208208

209209
assert_eq!(option_child.properties[0].name, Some("optional".to_string()));
210-
assert_eq!(option_child.properties[0].code, 500);
210+
assert_eq!(option_child.properties[0].code, 500isize);
211211
}
212212

213213
#[test]
214214
fn parametrized_struct_where_multiple_properties_test() {
215215
// Test struct with multiple parametrized properties
216216
let props = vec![
217-
ParametrizedProperty::<String>::new("prop1".to_string(), 1),
218-
ParametrizedProperty::<String>::new("prop2".to_string(), 2),
219-
ParametrizedProperty::<String>::new("prop3".to_string(), 3),
217+
ParametrizedProperty::<String>::new("prop1".to_string(), 1isize),
218+
ParametrizedProperty::<String>::new("prop2".to_string(), 2isize),
219+
ParametrizedProperty::<String>::new("prop3".to_string(), 3isize),
220220
];
221221

222222
let got = StringParametrizedChild::former()
@@ -240,38 +240,38 @@ fn parametrized_struct_where_comprehensive_validation_test() {
240240
// Test comprehensive parametrized struct functionality without complex bounds
241241

242242
// Create various property types
243-
let simple_prop = SimpleProperty::new("simple", 1000);
244-
let string_prop = ParametrizedProperty::<String>::new("string".to_string(), 2000);
245-
let int_prop = ParametrizedProperty::<i32>::new(42, 3000);
243+
let simple_prop = SimpleProperty::new("simple", 1000isize);
244+
let string_prop = ParametrizedProperty::<String>::new("string".to_string(), 2000isize);
245+
let int_prop = ParametrizedProperty::<i32>::new(42, 3000isize);
246246

247247
// Create children with different parametrizations
248248
let string_child = StringParametrizedChild::former()
249249
.name("comprehensive_string".to_string())
250-
.properties(vec![ParametrizedProperty::<String>::new("comp_str".to_string(), 4000)])
250+
.properties(vec![ParametrizedProperty::<String>::new("comp_str".to_string(), 4000isize)])
251251
.active(true)
252252
.form();
253253

254254
let int_child = IntParametrizedChild::former()
255255
.name("comprehensive_int".to_string())
256-
.properties(vec![ParametrizedProperty::<i32>::new(999, 5000)])
256+
.properties(vec![ParametrizedProperty::<i32>::new(999, 5000isize)])
257257
.active(false)
258258
.form();
259259

260260
// Validate all work independently
261261
assert_eq!(simple_prop.name, "simple");
262-
assert_eq!(simple_prop.code, 1000);
262+
assert_eq!(simple_prop.code, 1000isize);
263263

264264
assert_eq!(string_prop.name, "string");
265-
assert_eq!(string_prop.code, 2000);
265+
assert_eq!(string_prop.code, 2000isize);
266266

267267
assert_eq!(int_prop.name, 42);
268-
assert_eq!(int_prop.code, 3000);
268+
assert_eq!(int_prop.code, 3000isize);
269269

270270
assert_eq!(string_child.name, "comprehensive_string");
271271
assert_eq!(string_child.properties[0].name, "comp_str");
272-
assert_eq!(string_child.properties[0].code, 4000);
272+
assert_eq!(string_child.properties[0].code, 4000isize);
273273

274274
assert_eq!(int_child.name, "comprehensive_int");
275275
assert_eq!(int_child.properties[0].name, 999);
276-
assert_eq!(int_child.properties[0].code, 5000);
276+
assert_eq!(int_child.properties[0].code, 5000isize);
277277
}

0 commit comments

Comments
 (0)