Skip to content

Commit 735e602

Browse files
committed
Add language specifiers to fenced code blocks.
1 parent a6e2506 commit 735e602

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ The rest of this document will focus on how this version of XCTest differs from
2626

2727
XCTest can be built as part of the overall Swift package. When following [the instructions for building Swift](http://www.github.com/apple/swift), pass the `--xctest` option to the build script:
2828

29-
```
29+
```sh
3030
swift/utils/build-script --xctest
3131
```
3232

3333
If you want to build just XCTest, use the `build_xctest.py` script at the root of the project. The `master` version of XCTest must be built with the `master` version of Swift.
3434

3535
If your install of swift is located at `/swift` and you wish to install XCTest into that same location, here is a sample invocation of the build script:
3636

37-
```
37+
```sh
3838
./build_script.py --swiftc="/swift/usr/bin/swiftc" --build-dir="/tmp/XCTest_build" --swift-build-dir="/swift/usr" --library-install-path="/swift/usr/lib/swift/linux" --module-install-path="/swift/usr/lib/swift/linux/x86_64"
3939
```
4040

4141
### Additional Considerations for Swift on Linux
4242

4343
When running on the Objective-C runtime, XCTest is able to find all of your tests by simply asking the runtime for the subclasses of `XCTestCase`. It then finds the methods that start with the string `test`. This functionality is not currently present when running on the Swift runtime. Therefore, you must currently provide an additional property called `allTests` in your `XCTestCase` subclass. This method lists all of the tests in the test class. The rest of your test case subclass still contains your test methods.
4444

45-
```
45+
```swift
4646
class TestNSURL : XCTestCase {
4747
var allTests : [(String, () -> ())] {
4848
return [
@@ -65,7 +65,7 @@ class TestNSURL : XCTestCase {
6565

6666
Also, this version of XCTest does not use the external test runner binary. Instead, create your own executable which links `libXCTest.so`. In your `main.swift`, invoke the `XCTMain` function with an array of instances of the test cases that you wish to run. For example:
6767

68-
```
68+
```swift
6969
XCTMain([TestNSString(), TestNSArray(), TestNSDictionary()])
7070
```
7171

0 commit comments

Comments
 (0)