|
6 | 6 |
|
7 | 7 | @testset "show" begin |
8 | 8 | @test sprint(show, Unconditional()) == "Unconditional" |
9 | | - @test sprint(show, Unconditional(); context=:compact => true) == "U" |
| 9 | + @test sprintcompact(Unconditional()) == "U" |
10 | 10 |
|
11 | 11 | @test sprint(show, Exact()) == "Parallel" |
12 | | - @test sprint(show, Exact(); context=:compact => true) == "P" |
| 12 | + @test sprintcompact(Exact()) == "P" |
13 | 13 | end |
14 | 14 | end |
15 | 15 |
|
|
68 | 68 | @testset "show" begin |
69 | 69 | @test sprint(show, nt0) == """ |
70 | 70 | Parallel trends with any never-treated group: |
71 | | - Never-treated groups: [0] |
72 | | - """ |
73 | | - @test sprint(show, nt0; context=:compact => true) == |
74 | | - "NeverTreated{U,P}([0])" |
| 71 | + Never-treated groups: [0]""" |
| 72 | + @test sprintcompact(nt0) == "NeverTreated{U,P}([0])" |
75 | 73 |
|
76 | 74 | @test sprint(show, nt1) == """ |
77 | 75 | Parallel trends with any never-treated group: |
78 | | - Never-treated groups: [0, 1] |
79 | | - """ |
80 | | - @test sprint(show, nt1; context=:compact => true) == |
81 | | - "NeverTreated{U,P}([0, 1])" |
| 76 | + Never-treated groups: [0, 1]""" |
| 77 | + @test sprintcompact(nt1) == "NeverTreated{U,P}([0, 1])" |
82 | 78 | end |
83 | 79 | end |
84 | 80 |
|
@@ -152,33 +148,25 @@ end |
152 | 148 | @test sprint(show, ny0) == """ |
153 | 149 | Parallel trends with any not-yet-treated group: |
154 | 150 | Not-yet-treated groups: [0] |
155 | | - Treated since: not specified |
156 | | - """ |
157 | | - @test sprint(show, ny0; context=:compact => true) == |
158 | | - "NotYetTreated{U,P}([0], NA)" |
| 151 | + Treated since: not specified""" |
| 152 | + @test sprintcompact(ny0) == "NotYetTreated{U,P}([0], NA)" |
159 | 153 |
|
160 | 154 | @test sprint(show, ny1) == """ |
161 | 155 | Parallel trends with any not-yet-treated group: |
162 | 156 | Not-yet-treated groups: [0, 1] |
163 | | - Treated since: not specified |
164 | | - """ |
165 | | - @test sprint(show, ny1; context=:compact => true) == |
166 | | - "NotYetTreated{U,P}([0, 1], NA)" |
| 157 | + Treated since: not specified""" |
| 158 | + @test sprintcompact(ny1) == "NotYetTreated{U,P}([0, 1], NA)" |
167 | 159 |
|
168 | 160 | @test sprint(show, ny2) == """ |
169 | 161 | Parallel trends with any not-yet-treated group: |
170 | 162 | Not-yet-treated groups: [0, 1] |
171 | | - Treated since: [0] |
172 | | - """ |
173 | | - @test sprint(show, ny2; context=:compact => true) == |
174 | | - "NotYetTreated{U,P}([0, 1], [0])" |
| 163 | + Treated since: [0]""" |
| 164 | + @test sprintcompact(ny2) == "NotYetTreated{U,P}([0, 1], [0])" |
175 | 165 |
|
176 | 166 | @test sprint(show, ny3) == """ |
177 | 167 | Parallel trends with any not-yet-treated group: |
178 | 168 | Not-yet-treated groups: [0, 1] |
179 | | - Treated since: [0, 1] |
180 | | - """ |
181 | | - @test sprint(show, ny3; context=:compact => true) == |
182 | | - "NotYetTreated{U,P}([0, 1], [0, 1])" |
| 169 | + Treated since: [0, 1]""" |
| 170 | + @test sprintcompact(ny3) == "NotYetTreated{U,P}([0, 1], [0, 1])" |
183 | 171 | end |
184 | 172 | end |
0 commit comments