Commit Graph

5277 Commits

Author SHA1 Message Date
Michael Gottesman
6f42934462 [test] Disable inherits_NSObject.swift on watchOS.
This was failing alongside inherits_ObjCClasses.swift (they were failing at the
same time).

Until MikeA has time to look at this disable this as well.

rdar://problem/50898688
2019-05-24 10:14:32 -07:00
David Smith
2dcd82239b Merge pull request #24874 from Catfish-Man/bulk-tests
Test foreign strings on invalid content more thoroughly
2019-05-22 16:28:23 -07:00
Mike Ash
5bcdb3c75c [Test] Disable inherits_ObjCClasses.swift on watchOS.
It's failing and it's going to take some more time to figure out why.

rdar://problem/50898688
2019-05-21 17:07:34 -04:00
Mike Ash
8c1a1dc9ff Merge pull request #24921 from mikeash/existentials-objc-test-disable-testing-os-libraries
[Test] Disable existentials_objc.swift when testing against OS libraries.
2019-05-21 11:00:56 -04:00
Mike Ash
d15a651094 [Test] Disable existentials_objc.swift when testing against OS libraries, as the 5.0 libraries don't support it.
rdar://problem/50175995
2019-05-20 15:31:25 -04:00
Jordan Rose
7963529da1 Merge pull request #24819 from jrose-apple/when-everyone-is-super-no-one-will-be
[Serialization] Drop a class if the superclass can't be found
2019-05-20 11:30:08 -07:00
Slava Pestov
865b79c516 Add regression test for fixed crasher 2019-05-17 23:08:31 -04:00
David Smith
7561f95134 Test foreign strings on invalid content more thoroughly 2019-05-17 16:18:34 -07:00
Jordan Rose
ff7c6f6702 [Serialization] Drop a class if the superclass can't be found
...instead of crashing. Also drop the class if its generic
requirements depend on a type that can't be loaded (instead of
crashing).

rdar://problem/50125674
2019-05-17 10:25:01 -07:00
Slava Pestov
5d66bb810a Run stable ABI tests on all Apple platforms
A number of tests exercise features only available in Apple OSes that
shipped with Swift 5.0 in the OS; this includes the following versions:

- macOS 10.14.4
- iOS 12.2
- tvOS 12.2
- watchOS 5.2

Previously these tests were restricted to running on macOS only, with
an explicit -target x86_64-apple-macosx10.14.4. To get better test
coverage, add a new %target-stable-abi-triple substitution which
expands to a triple with the correct OS version on all Apple platforms.

On non-Apple platforms, this is the same as %target-variant-triple,
but for now any test that uses this exercises Apple platform features
anyway.

One caveat is that since iOS 12.2 does not have a 32-bit slice, we
have to skip any tests that use -target %target-stable-abi-triple
on this platform. A new swift_stable_abi feature flag can be tested
with 'REQUIRES: swift_stable_abi'. To get maximum test coverage,
I split off a 'stable_abi' version of a few tests that build with both
an old and new deployment target. This allows the old deployment
target case to still be tested on 32-bit iOS.
2019-05-16 17:02:06 -04:00
Joe Groff
0be95f56bd Merge pull request #24798 from jckarter/opaque-type-check-availability
Opaque types require a newer Swift runtime.
2019-05-15 18:05:40 -07:00
Joe Groff
cec9e9e33a Opaque types require a newer Swift runtime.
Check the availability of decls that declare an opaque return type to ensure they deploy to a
runtime that supports opaque types.

rdar://problem/50731151
2019-05-15 11:39:53 -07:00
Andrew Trick
22e5c55b3a Merge pull request #24717 from atrick/cache-field-number
Cache struct/class field offsets in SIL.
2019-05-14 08:36:33 -07:00
Andrew Trick
8f84429565 Add a scale-test for VarDecl::getStoredProperties.
Adds a NumStoredPropertiesQueries stat.

Adds a test case for an increasing number of lazy stored class
properties. Each property requires a formal access within the
initializer. This would manifest as cubic behavior in
AccessEnforcementOpts, which scales as O(1.5) in the above stat.
2019-05-13 16:54:55 -07:00
Jordan Rose
c506747a9c [Serialization] Drop inherited conformances on classes (#23347)
These can be recreated if needed in a client library. To do this, I've
added a new ConformanceLookupKind::NonInherited, which can also be
used elsewhere in the project where we're already filtering out
inherited conformances some other way.

Note that this doesn't drop inherited conformances from the entire
serialized interface, just from the list that a class explicitly
declares. They still get referenced sometimes.

rdar://problem/50541451 and possibly others
2019-05-13 13:41:10 -07:00
Brent Royal-Gordon
781ce5ed5e XFAIL ParsableInterface/verify_all_overlays.py
rdar://problem/50648519
2019-05-09 20:48:43 -07:00
Slava Pestov
0da04ca1ed Merge pull request #24631 from slavapestov/reapply-weak-class-stubs-tests
Fix REQUIRES lines on class stubs tests
2019-05-09 10:53:30 -04:00
Arnold Schwaighofer
1e49e36be4 Merge pull request #24605 from aschwaighofer/fix_opaque_result_type_test_on_older_runtime
Opaque types require the next Swift runtime
2019-05-09 07:48:55 -07:00
Pavol Vaskovic
14f250bfa1 Merge pull request #24575 from palimondo/set-seq-unittests
[stdlib] Fix and Improve Unit Tests for Set.Sequence
2019-05-09 13:22:47 +02:00
Pavol Vaskovic
bce023aca6 [stdlib] Set.Sequence unittest explicit annotation
Use explicit type annotation to make it crystal clear (beyoud any reasonable doubt) these are indeed testing the Sequence variants.
2019-05-09 10:04:20 +02:00
Slava Pestov
52fbe642ed Fix REQUIRES lines on class stubs tests
We use the just-built clang without any -target or -sdk flags. Keep things
simple and limit the test to macOS for now.

Fixes <rdar://problem/50586614>.
2019-05-08 22:22:27 -04:00
Nathan Hawes
af3fbc52b3 Revert "Add tests for weak-linked class stubs" 2019-05-08 10:55:00 -07:00
Arnold Schwaighofer
11c665715c Opaque types require the next Swift runtime
rdar://50503909
2019-05-08 09:50:53 -07:00
Slava Pestov
5938f5a6a9 Merge pull request #24585 from slavapestov/weak-link-class-stubs
Add tests for weak-linked class stubs
2019-05-07 23:10:16 -04:00
Robert Widmann
df53d4cbc7 Merge pull request #24549 from drodriguez/enable-test-posix-error-code
[test] Enable impossible to support test POSIXErrorCode.
2019-05-07 19:12:53 -04:00
swift-ci
ed90f333de Merge pull request #24588 from DougGregor/pattern-type-check-crash 2019-05-07 15:01:31 -07:00
Doug Gregor
90d9721473 [Type checker] Fix a crash-on-invalid in pattern type checking.
Fixes rdar://problem/49731284.
2019-05-07 13:58:30 -07:00
Slava Pestov
9f4b86b741 Add test for weak-linked Objective-C resilient class stubs 2019-05-07 16:34:56 -04:00
Slava Pestov
fbd8b97351 Un-XFAIL validation-test/Runtime/class_stubs.m and adjust for Clang changes
The objc_loadClassref() symbol is weak linked from Clang now, so we can
un-XFAIL this test. Note that we have to pass a special flag to Clang
since objc_loadClassref() is not in the SDK's TBD files yet.

Also, change the test to use its own asserts instead of FileCheck since
there's no output unless a new libobjc is available.
2019-05-07 16:31:40 -04:00
Daniel Rodríguez Troitiño
3658b6c786 Merge pull request #24550 from drodriguez/android-enable-some-more-tests
[android] Enable some tests that should pass on Android.
2019-05-07 11:01:13 -07:00
Pavol Vaskovic
0f4c1cda0d [stdlib] Fix unit tests for Set.Sequence methods
Really test the Sequence variants of set algebra and cover the same cases as Set.Set.
2019-05-07 19:38:18 +02:00
Pavol Vaskovic
475c2099a7 [stdlib] Improve unit test coverage of Set.Set
Systematically test also set algebra:
* with empty sets on both sides
* inverse operation
2019-05-07 19:35:56 +02:00
Doug Gregor
24d24c0e63 [AST] Allocate GenericSignature(Builders) in the arena
Opaque result type archetypes can involve type variables, which
then get introduced into GenericSignatureBuilders and the
generated GenericSignatures. Allocate them in the proper arena
So we don’t end up with use-after-free errors.

Fixes rdar://problem/50309503.
2019-05-07 06:56:42 -07:00
Daniel Rodríguez Troitiño
1813cc3670 [android] Enable some tests that should pass on Android.
Some tests are limited to only Linux, when they should also pass for
Android.

Additionally, InputStream.swift.gyb was disabled for Android ARMv7, but
wasn't for Android AArch64, which allow me to find the error on it and
fix it on #24521.

Finally, StringLowercasedUppercased is interesting in Android because it
checks the used ICU is correct for performing the tasks that the stdlib
needs.
2019-05-06 17:53:51 -07:00
Daniel Rodríguez Troitiño
699b4821de [test] Enable impossible to support test POSIXErrorCode.
The REQUIRES written one in each line were impossible to satisfy in any
platform, so the test wasn't running at all. This was changed to a
REQUIRE-ANY listing all the platforms (and adding Android). I also
needed to add runAllTest() at the end to make the test pass.
2019-05-06 17:44:32 -07:00
Karoy Lorentey
f776a381f3 [test] Add availability guards for tests checking behavioral changes in 5.1 2019-05-03 19:09:47 -07:00
Karoy Lorentey
ed32972804 Merge pull request #24426 from Gumichocopengin8/set-test
add Set test
2019-05-02 12:09:08 -07:00
Keita Nonaka
35bbfbf880 add set filter test and minor fixes 2019-05-01 22:56:57 -04:00
Arnold Schwaighofer
a793dfb451 Respect resilience when specializing opaque type archetypes 2019-05-01 09:31:07 -07:00
Alexis Laferrière
1119b91e80 Merge pull request #24204 from xymus/structural-type-request
GSB: use a request for the structural type of type aliases
2019-04-30 14:39:39 -07:00
Alexis Laferrière
bddb40dacf GSB: ignore generic types in expandConformanceRequirement
Fixes crashes in 28437-swift-typechecker-validatedecl.swift (from previous commit)
and the compiler crasher 28861-gpdecl-getdepth-generictypeparamdecl-
invaliddepth-parameter-hasnt-been-validated.swift.
2019-04-30 10:43:23 -07:00
Daniel Rodríguez Troitiño
fa5d66c4a4 Merge pull request #24175 from drodriguez/android-dont-append-negative-EOF
[android] Do not try to turn EOF into an UInt8
2019-04-29 13:45:04 -07:00
Nate Chandler
a09a9640d0 Don't implicitly return assignments.
Corrected a number of diagnostic regressions.
2019-04-24 10:09:19 -07:00
Nate Chandler
c21678d34a Corrected tests by removing implicit returns. 2019-04-24 10:04:20 -07:00
Daniel Rodríguez Troitiño
5835cebe99 [android] Do not try to turn EOF into an UInt8
Android is one of those platforms that define the symbol EOF as a
negative number. Trying to turn it into an UInt8 will only crash the
test. Move the transformation after we have checked for EOF first. In my
opinion, in other platforms, having the EOF attached to the getline
result was also invalid, and that's probably why the two test that use
EOF were sending an extra newline.

Even with this, the tests do not pass on Android because it deadlocks
waiting for input/output from the child process, which never happens. I
haven't find why this happens, but only happens if the last test of the
suite closes stdin. I will try to fix that in another PR.
2019-04-19 17:24:45 -07:00
Slava Pestov
3bdb924bec Merge pull request #23846 from slavapestov/class-stub-fix-and-tests
Class stub fixes and execution tests
2019-04-19 19:39:52 -04:00
Slava Pestov
9536eff2d6 Execution tests for Objective-C resilient class stubs
Fixes <rdar://49090613>, except they're disabled for the time being.
2019-04-19 17:39:51 -04:00
Jordan Rose
c6efc8dc85 Test that the swiftinterface for the stdlib can be compiled (#24128)
...like we've done with the overlays for months. Meant to do this a
long time ago, but at the time we hadn't gotten the stdlib working
yet!
2019-04-19 14:27:23 -07:00
Arnold Schwaighofer
1e63ce77fb Revert "Temporarily disable stdlib tests depending on autorelease elision." 2019-04-16 08:34:01 -07:00
Andrew Trick
bb8c5c66f9 Temporarily disable stdlib tests depending on autorelease elision.
Until the issue is fixed. Tracked by:
<rdar://problem/49791522> Swift CI Test failures: IRGen/autorelease_optimized_armv7/aarch64.
https://bugs.swift.org/browse/SR-10474
2019-04-15 16:31:47 -07:00