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
//! # Test Matrix for `New` Derive
//!
//! This matrix outlines the test cases for the `New` derive macro.
//!
//! | ID | Struct Type | Fields | Expected Behavior |
//! |-------|-------------|--------|-------------------------------------------------|
//! | N1.1 | Unit | None | Should derive `new()` constructor |
//! | N1.2 | Tuple | 1 | Should derive `new()` constructor with one arg |
//! | N1.3 | Tuple | >1 | Should derive `new()` constructor with multiple args |
//! | N1.4 | Named | 1 | Should derive `new()` constructor with one arg |
//! | N1.5 | Named | >1 | Should derive `new()` constructor with multiple args |
use test_tools :: *;
use crate the_module New;
// N1.1 : Unit struct - New derive not available
// #[ derive( New ) ]
;
// N1.2 : Tuple struct with one field - New derive doesn't support tuple structs yet
// #[ derive( New ) ]
;
// N1.3 : Tuple struct with multiple fields - New derive doesn't support tuple structs yet
// #[ derive( New ) ]
;
// N1.4 : Named struct with one field - New derive not available
// #[ derive( New ) ]
// N1.5 : Named struct with multiple fields - New derive not available
// #[ derive( New ) ]
// Shared test logic
include!;