* Fix many version checks to be based on Xcode version instead of iOS version.
* Added/fixed a few expected values according to platform version to match behavior in older macOS versions.
Hopefully third time's the charm...
Don't do date math (adding hours) to a local datetime, since DST *will* muddy
the waters and prove that 1=2.
Instead convert the date we want to calculate on to UTC, which should be DST-agnostic.
I've tested this by running the test for every hour during the next 10 years,
so that should cover mostly everything (although I'm still waiting for the
Delorean I ordered to be able to test both in the future and the past).
Previous attempts:
0442cdf9c05caddb3571
Should fix https://github.com/xamarin/maccore/issues/573.
In 0442cdf9c0 the `now` variable was changed to
be a UTC date, but unfortunately the code that compares it to a local date
(NSDate.Now) wasn't updated.
Only year/month/day values were compared, which meant the test would fail if
run when UTC and local time didn't represent the same date (and conversely
would pass if the UTC and local date was the same date, which is why the
changed did not fail the PR test run: the PR was tested during the 19 hours of
the day when EST and UTC represent the sam date).
Fix this by converting the UTC `now` to NSDate instead of using NSDate.Now.
This has the additional benefit of also fixing a (much smaller) race
condition: if midnight occurred just between calculating `now` and NSDate.Now,
the test would also fail.
At 2:00 AM on November 5h 2017, winter came to our bots in Boston.
This meant that between 2:00 and 3:00 AM, subtracting 1h from the current
time yielded a time difference of 2h.
This was caught by our observant tests:
[FAIL] CalendarTest.DateComponentsTest : b hour
Expected: 1
But was: 2
To avoid such issues next time this test happens to run during this single
hour of the entire year that causes problems, change the test to use time
calculcation using UTC instead.
* [monotouch-test] Disable EmptyNib tests due to Xcode9 no longer builds nibs if deployment target < 7.0
EmptyNib.xib : ibtool error : Compiling IB documents for earlier than iOS 7 is no longer supported.
* [monotouch-test] Fixt CalendarTest.TestEnumerateDates
It seems that NSCalendar.CurrentCalendar.EnumerateDatesStartingAfterDate
won't stop enumerating unless `stop` is set to `true`.
* [Tests] Add CheckXcodeVersion support for Xcode 9
* [introspection] Avoid introspection to crash with Xcode 9 Beta 1
* [monotouch-test] bring back LogicalName removal from monotouch-test.csproj