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.
Check the exit status of the processes run during the runtime-testsuite
for Swift. This means that we'll catch low-level issues earlier.
This changeset also changes the exception handling so that exceptions
throw as far up as possible so that we don't proceed with a test when
something has already broken.
Remove unused DeclareLocal and PlusMember macros from *.test.stg.
DeclareLocal was last used in 5c5228 (June 2015) and PlusMember was
last used in 7f16fe6 (Nov 2016).
Change the unit test asserts so that we can see all the values in the
event of a failure. When debugging an error, it's useful to see both
the stdout and stderr for the failure. Previously we would only see
one or the other (whichever one failed the assert).
This adds a helper function BaseRuntimeTest.assertCorrectOutput.
This also removes SpecialRuntimeTestAssert, which has not been used for
2 years.
This means that if you build in an unclean source tree, you don't end up with
intermediate classes in the jar. (This hasn't broken anything that I noticed,
but it bloats the jar and I wanted to make sure it wasn't messing anything up.)
This excludes .build (the Swift runtime's build directory), target (the Java
runtime's build directory) and Swift/*.xcodeproj (which is not in the source tree
but can be created by devs who are using Xcode).
Suppress "Optional" in the output when printing a value in the tests and
some debugging messages.
This is a change in behavior in Swift 4.2 (SE-0054) that implicitly
unwrapped optionals are now seen as plain Optional at runtime, and so
print doesn't implicitly unwrap them any more.
This is in different locations on JDK 9 and up. maven-jdk-tools-wrapper
does the right thing on all JDK releases.
This was mentioned in a side comment on PR #2280.
These were skipped for the Javascript backends because they're still
too slow, but Swift is fine. (Go is also excluded from these, maybe
that's a mistake, but I don't know.)
Issue #2078 is a crash (SIGILL) inside the dotnet runtime when running on
macOS on Travis. This is intermittent, so a retry may help. Retry this
specific exit status inside runProcess.
Log the command / stdout / stderr / exit status at three places
during the C# runtime tests.
At these places we are executing subprocesses, but if those fail we
weren't logging the info that we may need to diagnose the problem.
Assert that the dotnet restore / build commands succeeded. If we
get a failure at this point, the test is obviously going to fail, and
we're masking the error by trying to push on with other commands.
BailErrorStrategy is supposed to throw an error that's different from
the ordinary recognition error, specifically so that it can be handled
differently by client code. This was not ported over from Java correctly.
Fix this by moving parseCancellation from ANTLRError to ANTLRException,
adding its RecognitionException argument, and throwing it from the
two handlers in BailErrorStrategy.
Also remove ANTLRException.cannotInvokeStartRule, which is unused.
(The Java runtime uses it when ParseTreePatternMatcher throws a generic
exception, but we don't have that.)