Commit efac016
authored
[NFC][libc++] Refactors the time.cal tests. (#73356)
These tests use an old way to test code in constexpr context. This
changes the code to the idomatic libc++ method.
This is a preparation for #73162.
Side changes
- Updated formatting
- Made some helper functions constexpr
- Some naming improvements1 parent 0783bf1 commit efac016
File tree
38 files changed
+1095
-1481
lines changed- libcxx/test/std/time/time.cal
- time.cal.day
- time.cal.day.members
- time.cal.day.nonmembers
- time.cal.month/time.cal.month.nonmembers
- time.cal.weekday
- time.cal.weekday.members
- time.cal.weekday.nonmembers
- time.cal.year
- time.cal.year.members
- time.cal.year.nonmembers
- time.cal.ymdlast
- time.cal.ymdlast.members
- time.cal.ymdlast.nonmembers
- time.cal.ymd
- time.cal.ymd.members
- time.cal.ymd.nonmembers
- time.cal.ymwdlast
- time.cal.ymwdlast.members
- time.cal.ymwdlast.nonmembers
- time.cal.ymwd
- time.cal.ymwd.members
- time.cal.ymwd.nonmembers
- time.cal.ym
- time.cal.ym.members
- time.cal.ym.nonmembers
38 files changed
+1095
-1481
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
38 | 36 | | |
Lines changed: 17 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 22 | + | |
32 | 23 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
38 | 33 | | |
39 | | - | |
40 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
41 | 37 | | |
42 | | - | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 41 | + | |
| 42 | + | |
51 | 43 | | |
52 | 44 | | |
53 | 45 | | |
Lines changed: 18 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 22 | + | |
32 | 23 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
38 | 34 | | |
39 | | - | |
40 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
41 | 38 | | |
42 | | - | |
| 39 | + | |
| 40 | + | |
43 | 41 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 42 | + | |
| 43 | + | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
Lines changed: 20 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 44 | + | |
| 45 | + | |
56 | 46 | | |
57 | 47 | | |
58 | 48 | | |
Lines changed: 19 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 25 | + | |
| 26 | + | |
35 | 27 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
40 | 36 | | |
41 | | - | |
42 | | - | |
| 37 | + | |
| 38 | + | |
43 | 39 | | |
44 | | - | |
45 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
46 | 43 | | |
47 | | - | |
| 44 | + | |
| 45 | + | |
48 | 46 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 47 | + | |
| 48 | + | |
57 | 49 | | |
58 | 50 | | |
59 | 51 | | |
Lines changed: 20 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 25 | + | |
| 26 | + | |
35 | 27 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
40 | 37 | | |
41 | | - | |
42 | | - | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
46 | 44 | | |
47 | | - | |
| 45 | + | |
| 46 | + | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 48 | + | |
| 49 | + | |
58 | 50 | | |
59 | 51 | | |
60 | 52 | | |
0 commit comments