skip component diff if ICU too old

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39491 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-09 09:37:20 +00:00
parent a678467542
commit 8904edf3fe

View file

@ -28,11 +28,16 @@ int main()
date = [NSDate dateWithString: @"2015-01-01 01:01:01 +0100"];
date2 = [NSDate dateWithString: @"2015-02-03 04:05:06 +0100"];
comps = [cal components: NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit
| NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit
comps = [cal components:
NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit
| NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit
fromDate: date
toDate: date2
options: 0];
if (nil == comps)
{
SKIP("-components:fromDate:toDate:options: not implementaed. The ICU library was not available (or too old) when GNUstep-base was built")
}
PASS([comps year] == 0, "year difference correct");
PASS([comps month] == 1, "month difference correct");
PASS([comps day] == 2, "day difference correct");