This switches from using the deprecated hashValue to hash(into:).
It also switches from using index to firstIndex (matching the change in
the standard library).
In the test template, we switch to using String directly instead of
String.characters.
This also switches all the Travis macOS tests to use the Xcode 10.2 / Mojave
image and changes the Linux Swift tests to download Swift 5.0.1.
Move Travis Swift, .NET, and C++ macOS tests from Xcode 9 to Xcode 10.1.
Move Travis Linux Swift tests from Trusty to Xenial and to Swift 4.2.1.
Remove the dirname call when setting JAVA_HOME, it seems to be incorrect.
Print the JAVA_HOME that Travis ends up with.
Moving to Xcode 10.1 / Swift 4.2 exposes the issue discussed in #2372
so this cset will fail automated tests without the relevant fixes.
Remove some functions that are no longer used, and update the
rest to Swift 4's String API. lastIndexOf changes to lastIndex(of: ),
matching the standard library naming conventions, and returns a
String.Index? instead of an Int.
Add an implementation of Substring.hasPrefix for Linux; this
is in the Apple standard library but not the Linux one.
https://bugs.swift.org/browse/SR-5627
Add unit tests for StringExtension.
Bump the Swift download for the Travis Linux tests from 4.0
to 4.0.2. There is a bug in Substring.range(of:) in 4.0.0
(https://bugs.swift.org/browse/SR-5663) that we need to avoid.
These are the unit tests that are written in Swift, not the more
in-depth runtime-testsuite tests (we were always running those).
I don't know why JAVA_HOME isn't set during run-tests-swift.sh, but it
isn't. Set it, since runtime/Swift/boot.py expects it as part of the
parser generation.
This uses Travis's new(ish) Ubuntu Trusty image, and changes the
version number of the Swift binaries that we download.
We now install clang-3.6. This is not the default on Trusty, but
it's required by the Swift 4.0 toolchain.
This also removes the lines to upgrade libicu-dev and sqlite3. These
are sufficiently up-to-date in the Trusty image.