|
1 | | -//! Purpose: Provides shared test assertions and logic for verifying the constructors generated |
2 | | -//! by `#[derive(Former)]` for enums with unnamed (tuple) variants that have independent generic |
3 | | -//! parameters and bounds, specifically when the variant is marked with `#[scalar]`. |
4 | | -//! This file is included by both `generics_independent_tuple_derive.rs` and `generics_independent_tuple_manual.rs`. |
5 | | -//! |
6 | | -//! Coverage: |
7 | | -//! - Rule 1d (Tuple + Single-Field + `#[scalar]` -> Scalar): Tests static method `EnumG5::<T>::v_1()`. |
8 | | -//! - Rule 4b (Option 2 Logic): Tests the use of subformer methods and `.form()`. |
9 | | -//! |
10 | | -//! Test Relevance/Acceptance Criteria: |
11 | | -//! - Defines dummy bounds (`BoundA`, `BoundB`) and concrete types (`TypeForT`, `TypeForU`) that satisfy them. |
12 | | -//! - Defines test functions (`independent_generics_tuple_variant`, `default_construction_independent_generics`) |
13 | | -//! that invoke the static method `EnumG5::<TypeForT>::v_1()` provided by the including file (either derived or manual). |
14 | | -//! - This constructor returns a subformer (`InnerG5Former` specialized with `TypeForU` and configured to return `EnumG5<TypeForT>`). |
15 | | -//! - The tests use the subformer setter (`._0()`) and `.form()` to build the final enum instance. |
16 | | -//! - Asserts that the resulting `EnumG5` enum instances are equal to the expected variants |
17 | | -//! (`EnumG5::V1(InnerG5 { ... }, PhantomData)`), confirming correct handling of independent generics and the `#[scalar]` attribute. |
| 1 | +// Purpose: Provides shared test assertions and logic for verifying the constructors generated |
| 2 | +// by `#[derive(Former)]` for enums with unnamed (tuple) variants that have independent generic |
| 3 | +// parameters and bounds, specifically when the variant is marked with `#[scalar]`. |
| 4 | +// This file is included by both `generics_independent_tuple_derive.rs` and `generics_independent_tuple_manual.rs`. |
| 5 | +// |
| 6 | +// Coverage: |
| 7 | +// - Rule 1d (Tuple + Single-Field + `#[scalar]` -> Scalar): Tests static method `EnumG5::<T>::v_1()`. |
| 8 | +// - Rule 4b (Option 2 Logic): Tests the use of subformer methods and `.form()`. |
| 9 | +// |
| 10 | +// Test Relevance/Acceptance Criteria: |
| 11 | +// - Defines dummy bounds (`BoundA`, `BoundB`) and concrete types (`TypeForT`, `TypeForU`) that satisfy them. |
| 12 | +// - Defines test functions (`independent_generics_tuple_variant`, `default_construction_independent_generics`) |
| 13 | +// that invoke the static method `EnumG5::<TypeForT>::v_1()` provided by the including file (either derived or manual). |
| 14 | +// - This constructor returns a subformer (`InnerG5Former` specialized with `TypeForU` and configured to return `EnumG5<TypeForT>`). |
| 15 | +// - The tests use the subformer setter (`._0()`) and `.form()` to build the final enum instance. |
| 16 | +// - Asserts that the resulting `EnumG5` enum instances are equal to the expected variants |
| 17 | +// (`EnumG5::V1(InnerG5 { ... }, PhantomData)`), confirming correct handling of independent generics and the `#[scalar]` attribute. |
18 | 18 | use super::*; // Imports items from the parent file (either manual or derive) |
19 | 19 | // Define dummy bounds for testing purposes |
20 | 20 | pub trait BoundA : core::fmt::Debug + Default + Clone + PartialEq {} |
|
0 commit comments