1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Purpose: Provides a hand-written implementation of the `Former` pattern's static constructors
//! for zero-field tuple variants, demonstrating the manual implementation corresponding to both
//! default behavior and the effect of the `#[ scalar ]` attribute.
//!
//! Coverage:
//! - Rule 3b (Tuple + Zero-Field + Default): Manually implements the static method `EnumWithZeroFieldTuple::variant_zero_default()` to return the enum instance.
//! - Rule 1b (Tuple + Zero-Field + `#[ scalar ]`): Manually implements the static method `EnumWithZeroFieldTuple::variant_zero_scalar()` to return the enum instance.
//! - Rule 4a (`#[ standalone_constructors ]`): Manually implements standalone constructor functions (`enum_with_zero_field_tuple_variant_zero_default`, `enum_with_zero_field_tuple_variant_zero_scalar`) to return the enum instance, corresponding to the tests in `_only_test.rs`.
//!
//! Test Relevance/Acceptance Criteria:
//! - Defines an enum `EnumWithZeroFieldTuple` with zero-field tuple variants `VariantZeroDefault` and `VariantZeroScalar`.
//! - Provides hand-written static methods (`variant_zero_default`, `variant_zero_scalar`) and standalone functions (`enum_with_zero_field_tuple_variant_zero_default`, `enum_with_zero_field_tuple_variant_zero_scalar`) that mimic the behavior expected from the `#[ derive( Former ) ]` macro for zero-field tuple variants.
//! - Includes shared test logic from `tuple_zero_fields_only_test.rs`.
//! - The included tests call these manually implemented methods/functions and assert that the returned enum instances match the direct enum variants. This verifies the manual implementation of constructors for zero-field tuple variants.
use *;
use *;
use Debug;
use PhantomData;
// Helper struct used in tests (though not directly by this enum's variants)
// Define the enum without the derive macro
// Standalone constructors (matching derive macro output)
// Suppress unused warning for demonstration function
// Suppress unused warning for demonstration function
// Include the shared test logic
include!;