Commit Graph

10 Commits

Author SHA1 Message Date
Erik Eckstein
adef0368bb tests: add import statements to workaround linker errors in all relevant tests.
This is needed if we compile StdlibUnittest with -sil-serialize-all
So far I added the imports only in files which needed them. But this may change, depending on the optimizer (inlining).
Adding them in all files doesn't harm and avoids confusion if someone makes an unrelated change which would result in such a linker error.
2016-01-21 09:59:50 -08:00
Chris Lattner
82e5c0c592 Update various tests to stop using ++/-- 2015-12-21 18:07:37 -08:00
practicalswift
b88b198660 Fix typo: famework → framework 2015-12-14 00:11:47 +01:00
Dmitri Gribenko
4324e7c903 Remove conditional compilation of tvOS 2015-12-01 14:43:45 -07:00
Devin Coughlin
632a451c29 Tests: Additional run-time tests for Obj-C weak linking.
Add tests that would access Objective-C class metadata by casting and
generic type parameters. Also run these tests with the optimizer turned on.

Swift SVN r30299
2015-07-17 03:11:37 +00:00
Devin Coughlin
7573aebf6c Tests: Make availability_weak_linking.swift require enable_target_appletvos
This fixes a test failure when appletvos is not enabled. Also, stop trying to
link against a swift source file. This was causing the linker to emit a scary
warning.

Swift SVN r30158
2015-07-13 19:16:15 +00:00
Ben Langmuir
d56ad1d6fa Fix casing Objc => ObjC in test
Case-[in]sensitivity strikes again.

Swift SVN r30087
2015-07-10 20:42:28 +00:00
Devin Coughlin
007dfe15bf Runtime: Allow protocol extensions for weakly-linked Objective-C classes
Change ProtocolConformanceRecord::getCanonicalTypeMetadata() to return null if
the class metadata in the protocol conformance record is null. This fixes a
runtime crash in swift_conformsToProtocol when there is a protocol extension of
a missing weakly-linked class.

rdar://problem/21541766

Swift SVN r30012
2015-07-09 03:36:57 +00:00
Devin Coughlin
b8fded0c8c Test: Fix copy-paste error in availability_weak_linking.swift
The goal is to test that we can safely cast to an Objective-C protocol that is
defined in a missing weakly-linked framework, even when the protocol
declaration is missing an availability annotation (this is common in
Objective-C frameworks).

Swift SVN r30010
2015-07-09 01:49:53 +00:00
Devin Coughlin
ecc7307e76 Test: Emulate deployment on older OSes to test weak linking to Objective-C
These tests emulate deploying back to an older OS where newer APIs are not
available by linking to an Objective-C framework where APIs have been
annotated to only be available in the far future and then moving the famework
aside so that it can't be found at run time.

These tests include some basics (global variables and classes), but the focus
is on Objective-C protocols to validate the change allowing types to
conform to protocols less available than the types themselves.

Swift SVN r30005
2015-07-09 00:58:27 +00:00