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.