@@ -3,7 +3,7 @@ use Test;
3
3
4
4
# L<S32::Temporal/C<Date>>
5
5
6
- plan 116 ;
6
+ plan 122 ;
7
7
8
8
# construction
9
9
{
@@ -176,13 +176,15 @@ is Date.new('2015-12-29',:formatter({sprintf "%2d/%2d/%4d",.day,.month,.year})),
176
176
}
177
177
178
178
{
179
- class FooDate is Date { has $ . foo };
179
+ my class FooDate is Date { has $ . foo };
180
180
for (2016 ,2 ,20 ), ' 2016-02-20' , \(: 2016 year,: 2 month,: 20 day) -> $ date {
181
181
my $ fd = FooDate. new (| $ date , foo => 42 );
182
- is $ fd . year, 2016 , " is year in FooDate ok" ;
183
- is $ fd . month, 2 , " is month in FooDate ok" ;
184
- is $ fd . day, 20 , " is day in FooDate ok" ;
185
- is $ fd . foo, 42 , " is foo in FooDate ok" ;
182
+ isa-ok $ fd , FooDate, ' created object is of right type' ;
183
+ isa-ok $ fd , Date , ' created object is a subclass' ;
184
+ is-deeply $ fd . year, 2016 , ' is year in FooDate ok' ;
185
+ is-deeply $ fd . month, 2 , ' is month in FooDate ok' ;
186
+ is-deeply $ fd . day, 20 , ' is day in FooDate ok' ;
187
+ is-deeply $ fd . foo, 42 , ' is foo in FooDate ok' ;
186
188
}
187
189
}
188
190
0 commit comments