Commit Graph

24 Commits

Author SHA1 Message Date
Robert Widmann
cddf73ecdb [Gardening] Clean Up OS-Test Patterns Across The Codebase
Clean up a few general patterns that are now obviated by canImport

This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
2020-06-30 22:55:58 -07:00
Sho Ikeda
b68be20e9d [test][gardening] Prefer os(macOS) over os(OSX) 2018-03-11 10:58:58 +09:00
Dmitri Gribenko
c9041beea3 Migrate callsites from 'expectNotEmpty()' to 'expectNotNil()' 2016-09-10 20:05:43 -07:00
Jordan Rose
3b6e40c030 Use ClassDecl::ForeignKind to model Clang's objc_runtime_visible.
We're now correctly checking for inheritance, adding @objc methods,
and adding @objc protocols for both CF types and objc_runtime_visible
classes (those without visible symbols). The latter is used for some
of the types in Dispatch, which has exposed some of the classes that
were considered implementation details on past OSs.

We still don't properly implement using 'as?' to check conformance to
a Swift protocol for a CF or objc_runtime_visible type, but we can do
that later.

rdar://problem/26850367
2016-06-30 11:20:58 -07:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00
Michael Ilseman
667615307c [Import as Member] Skip needless prefix words.
When adding a prefix to the first argument of an initializer, skip
needless leading words such as "With" or "CF".
2016-05-06 14:50:58 -07:00
Jordan Rose
bc83940301 Make pointer nullability explicit using Optional.
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md

- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
  hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
  (like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
  optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
  parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.

I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)

The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
2016-04-11 20:06:38 -07:00
Ted Kremenek
8e91efb39d Revert "Revert "[Import as member] First draft of renaming CG APIs"" 2016-04-08 21:26:03 -07:00
Ted Kremenek
18504de7dd Revert "[Import as member] First draft of renaming CG APIs" 2016-04-08 21:00:00 -07:00
Michael Ilseman
dc34fd61af [Import as member] Need to keep pre-9.0 APIs available 2016-04-08 17:17:44 -07:00
Michael Ilseman
b437a96ee4 [Import as member] Bring test cases up to date 2016-04-08 15:56:50 -07:00
Michael Ilseman
3a2fed44f5 [Import as member] First draft of renaming CG APIs
This includes several large manual renaming of CG APIs where we want
different results than what the inference system produces.
2016-04-08 15:27:59 -07:00
Michael Ilseman
8a31b4b9f3 [Import as member] Mark CG APIs as nonswift
Several CG APIs are meant to be imported as nonswift, so mark them so
in our API notes.
2016-04-08 15:27:59 -07:00
Michael Ilseman
2b5b839686 [Import as member] Turn on CoreGraphics.
Introduces CoreGraphics.apinotes, in which we enable the
import-as-member inference system. Additionally, include some explicit
SwiftNames, for when inference doesn't produce the right result, and
to aid compatibility with the overlays.

Refactors many of the trivial overlays out, shrinking the
CoreGraphics.swift overlay by over half. Updates in-tree test
cases. The names we currently have will be highly in flux for a while,
and are likely to change frequently over the near term.

There are a few remaining known bugs that are worked around by
apinotes entries.
2016-04-06 11:03:18 -07:00
Greg Parker
0386c7fe60 [test] Fix some watchOS test failures.
Swift SVN r29315
2015-06-05 05:47:16 +00:00
Arnold Schwaighofer
859fbc0162 More executable_test for the test directory
Swift SVN r29280
2015-06-03 23:28:51 +00:00
Dmitri Hrybenko
0fd24e9d14 Updates for SDK nullability fixes
Swift SVN r29255
2015-06-02 20:59:17 +00:00
Doug Gregor
3926c349b2 Eliminate uses of ‘#’ from the testsuite.
Swift SVN r28842
2015-05-20 20:21:42 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Chris Willmore
98d17e318d Add support for AppleTV simulator tests.
You can run tests with e.g. 'ninja check-swift-appletvsimulator-x86_64'.

Swift SVN r27297
2015-04-14 23:53:03 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Joe Groff
deaab5094d Add an execution test for extensions to CF types.
Swift SVN r19643
2014-07-07 22:42:11 +00:00