39
40
41
42
43
44
45
46
47
48
|
TEST(@"-[isEqual:]",
[d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0]] &&
![d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0
microseconds: 1]])
TEST(@"-[compare:]", [d1 compare: d2] == OF_ORDERED_ASCENDING)
[pool drain];
}
@end
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
67
|
TEST(@"-[isEqual:]",
[d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0]] &&
![d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0
microseconds: 1]])
TEST(@"-[compare:]", [d1 compare: d2] == OF_ORDERED_ASCENDING)
TEST(@"-[seconds]", [d1 seconds] == 0 && [d2 seconds] == 5)
TEST(@"-[microseconds]",
[d1 microseconds] == 0 && [d2 microseconds] == 1)
TEST(@"-[minutes]", [d1 minutes] == 0 && [d2 minutes] == 0)
TEST(@"-[hours]", [d1 hours] == 0 && [d2 hours] == 1)
TEST(@"-[dayOfMonth]", [d1 dayOfMonth] == 1 && [d2 dayOfMonth] == 2)
TEST(@"-[monthOfYear]", [d1 monthOfYear] == 1 && [d2 monthOfYear] == 1)
TEST(@"-[year]", [d1 year] == 1970 && [d2 year] == 1970)
TEST(@"-[dayOfWeek]", [d1 dayOfWeek] == 4 && [d2 dayOfWeek] == 5)
TEST(@"-[dayOfYear]", [d1 dayOfYear] == 1 && [d2 dayOfYear] == 2)
[pool drain];
}
@end
|