Skip to content

Commit 13fdbd7

Browse files
fpseverinogrynspan
andauthored
Update Core Libraries page (#1023)
* Add Swift Testing to Core Libraries * Update Foundation core libraries page for `swift-foundation` * Update _foundation.md Co-authored-by: Jonathan Grynspan <[email protected]> * Update _foundation.md Co-authored-by: Jonathan Grynspan <[email protected]> * Update _foundation.md * Update _xctest.md --------- Co-authored-by: Jonathan Grynspan <[email protected]>
1 parent df91efd commit 13fdbd7

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

documentation/core-libraries/_foundation.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ The Foundation framework defines a base layer of functionality that is required
99
* Provide a level of OS independence, to enhance portability.
1010

1111

12-
More information about the Foundation framework in general is available
13-
[from Apple's documentation](https://developer.apple.com/reference/foundation). The Swift.org version of Foundation makes use of many
14-
of the same underlying libraries (e.g. ICU and CoreFoundation) as Apple's
15-
implementation, but has been built to be completely independent of the
16-
Objective-C runtime. Because of this, it is a substantial reimplementation of
17-
the same API, using pure Swift code layered on top of these common underlying
18-
libraries. Much more information about this work is available on our
19-
[GitHub project page](http://www.github.com/swiftlang/swift-corelibs-foundation).
12+
Swift 6 unifies the implementation of key [Foundation](https://developer.apple.com/documentation/foundation/) API across all platforms. Foundation's modern, portable Swift implementation provides consistency across platforms, is more robust, and is open source.
13+
14+
If your app is particularly sensitive to binary size, you can import the `FoundationEssentials` library, which provides a more targeted subset of Foundation’s features that omits internationalization and localization data.
15+
16+
More information about this work is available on our [GitHub project page](https://github.com/swiftlang/swift-foundation).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Swift Testing
2+
3+
Swift Testing is a package with expressive and intuitive APIs that make testing your Swift code a breeze.
4+
5+
It provides detailed output when a test fails using macros like `#expect`. And it scales to large codebases with features like parameterization to easily repeat a test with different arguments.
6+
7+
If you already have tests written using XCTest, you can run them side-by-side with newer tests written using Swift Testing. This helps you migrate tests incrementally, at your own pace.
8+
9+
More information about Swift Testing is available on our [GitHub project page](https://github.com/swiftlang/swift-testing).
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
## XCTest
22

3-
The XCTest library is designed to provide a common framework for writing unit tests in Swift, for Swift packages and applications.
3+
The XCTest library provides a common framework for writing unit tests in Swift, for Swift packages and applications.
44

5-
This version of XCTest uses the same API as the XCTest you are familiar with from Xcode. Our goal is to enable your project's tests to run on all Swift platforms without having to rewrite them.
5+
This version of XCTest uses the same API as the XCTest you may be familiar with from Xcode. Our goal is to enable your project's tests to run on all Swift platforms without having to rewrite them.
6+
7+
While XCTest remains supported, [Swift Testing](https://github.com/swiftlang/swift-testing) is the recommended framework for writing new tests. Swift Testing offers a modern, expressive, and extensible approach to testing in Swift, and represents the direction of future development.
8+
9+
If you already have tests written using XCTest, you can run them side-by-side with newer tests written using Swift Testing.
610

711
More information about XCTest on Linux is available on our [GitHub project page](http://www.github.com/swiftlang/swift-corelibs-xctest).

documentation/core-libraries/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ have a goal of providing stable and useful features in the following key areas:
2525

2626
These libraries are part of our ongoing work to extend the cross-platform capabilities of Swift. We chose to make them part of our open source release so that we can work on them together with the community.
2727

28-
Writing code that provides all of this functionality from scratch would be an enormous undertaking. Therefore, we've decided to bootstrap this project by taking advantage of great work that has already been done in these areas. Specifically, we will reuse the API and as much implementation as is possible from three existing libraries: `Foundation`, `libdispatch`, and `XCTest`.
28+
Writing code that provides all of this functionality from scratch would be an enormous undertaking. Therefore, we've decided to bootstrap this project by taking advantage of great work that has already been done in these areas. Specifically, we will reuse the API and as much implementation as is possible from three existing libraries: `Foundation`, `libdispatch`, and `XCTest`. In addition to these there is `Swift Testing`, a new testing library designed from the ground up for Swift.
2929

3030
* * *
3131

3232
{% include_relative _foundation.md %}
3333
{% include_relative _libdispatch.md %}
34+
{% include_relative _swift-testing.md %}
3435
{% include_relative _xctest.md %}
3536

3637
* * *
37-
38-
As stated above, this project is in its early days. We look forward to working together with the community to create a great set of libraries that enable Swift to produce powerful software across platforms.

0 commit comments

Comments
 (0)