You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Verification Strategy: Expect compilation success (`cargo check`) and zero tests run for `former_enum_tests` (`cargo test`). **Analyze logs critically.**
128
128
129
-
*[⚫]**Increment 2:** Uncomment and Test Basic Enum (`basic_*`)
130
-
***Requirement:** Uncomment `basic_derive`, `basic_manual`, and `basic_only_test` modules. Perform pre-analysis against "Expected Enum Former Behavior" (default subformer for single-field tuple). Address any `xxx`/`qqq` tasks in `basic_derive.rs`. Verify compilation and test success, diagnosing and fixing failures according to the "Failure Diagnosis Algorithm". Ensure `_derive` and `_manual` align with expected behavior.
129
+
*[⏳]**Increment 2:** Uncomment and Test Basic Enum (`basic_*`)
130
+
***Goal:** Activate and verify the tests for the basic enum `FunctionStep` involving single-field tuple variants holding `Former`-derived types.
131
+
***Detailed Plan Step 1:** Modify `module/core/former/tests/inc/mod.rs`. In the `mod former_enum_tests` block, uncomment the following lines:
132
+
```rust
133
+
modbasic_manual;
134
+
modbasic_derive;
135
+
// Note: basic_only_test.rs is included by the above, no direct mod line needed.
136
+
```
137
+
***DetailedPlanStep2:**Modify `module/core/former/tests/inc/former_enum_tests/basic_derive.rs`.Removethe `// xxx : generated code for debugging` comments and the `// qqq : xxx : uncomment and make it working` comment, as the relevant code is already present and uncommented.
138
+
***Pre-Analysis:**
139
+
*Theenum `FunctionStep` hastwovariants: `Break(Break)` and `Run(Run)`.Botharesingle-fieldtuplevariantsholdingtypesthatderive `Former`.
140
+
*The `basic_derive.rs` fileuses `#[derive(Former)]` and `#[former(standalone_constructors)]`.
141
+
***ExpectedBehavior (Rule3d&4):**Thederivemacroshouldgeneratestandaloneconstructorfunctions `break()` and `run()` thatreturntherespectivesubformers (`BreakFormer`, `RunFormer`).Thismatchesthelogicin `basic_manual.rs`.
142
+
***TestLogic (`basic_only_test.rs`):**Testscall `FunctionStep::r#break()` and `FunctionStep::run()`, use the returned former's setters (`.condition()`, `.command()`), and call `.form()`.
143
+
***Prediction:**Tests are expected to pass if the derive macro correctly implements the default subformer behavior for single-field tuple variants and standalone constructors.
1.Request user run `cargo check --tests --package former`.Expect success.
147
+
2.Request user run `cargo test --package former --test tests ----test-threads=1 --nocapture former_enum_tests::basic`.Expect tests `build_break_variant_static` and `build_run_variant_static` to pass.
148
+
3.Analyze logs critically using the "FailureDiagnosisAlgorithm" if failures occur.
131
149
132
150
* [⚫] **Increment 3:**Uncomment and TestEnumNamedFields (`enum_named_fields_*`)
133
151
***Requirement:**Uncomment `enum_named_fields_derive`, `enum_named_fields_manual`, and `enum_named_fields_only_test` modules.Perform pre-analysis against "ExpectedEnumFormerBehavior" (scalar vs. subform vs. implicit former based on attributes and field count).Verify compilation and test success, diagnosing and fixing failures according to the "FailureDiagnosisAlgorithm".Ensure `_derive` and `_manual` align with expected behavior.
0 commit comments