Skip to content

Commit

Permalink
Update compatibility_tests config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Jan 4, 2024
1 parent 3e6cf9f commit 11427d5
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,27 @@ jobs:
xcode-version: ${{ matrix.xcode-version }}
- name: Swift version
run: swift --version
- name: Run tests against Apple's SwiftUI on macOS
- name: Run compatibility tests on OpenSwiftUI + macOS
run: |
swift test \
--build-path .build-compatibility-test-debug
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 0
- name: Run compatibility tests on SwiftUI + macOS
run: |
swift test \
--build-path .build-compatibility-test-debug
env:
OPENSWIFTUI_COMPATIBILITY_TEST: 1
# - name: Run compatibility tests on OpenSwiftUI + iOS
# run: |
# swift test \
# --build-path .build-compatibility-test-debug
# env:
# OPENSWIFTUI_COMPATIBILITY_TEST: 0
# - name: Run compatibility tests on SwiftUI + iOS
# run: |
# swift test \
# --build-path .build-compatibility-test-debug
# env:
# OPENSWIFTUI_COMPATIBILITY_TEST: 1
2 changes: 2 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
swift test \
-c debug \
--filter OpenSwiftUITests \
-Xswiftc -warnings-as-errors \
--enable-code-coverage \
--build-path .build-test-debug
Expand All @@ -39,6 +40,7 @@ jobs:
run: |
swift test \
-c release \
--filter OpenSwiftUITests \
-Xswiftc -warnings-as-errors \
--enable-code-coverage \
--build-path .build-test-release
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
run: |
swift test \
-c debug \
--filter OpenSwiftUITests \
-Xswiftc -warnings-as-errors \
--enable-code-coverage \
--build-path .build-test-debug
Expand All @@ -32,6 +33,7 @@ jobs:
run: |
swift test \
-c release \
--filter OpenSwiftUITests \
-Xswiftc -warnings-as-errors \
--build-path .build-test-release
- uses: codecov/codecov-action@v3
Expand Down
22 changes: 22 additions & 0 deletions Tests/OpenSwiftUICompatibilityTests/EnvironmentValuesTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@ struct EnvironmentValuesTest {

@Test
func descriptionWithoutTracker() throws {
#if os(macOS)
// FIXME: The env.description will always be "[]" on macOS 13
if #unavailable(macOS 14) {
var env = EnvironmentValues()
#expect(env.description == "[]")
var bool = env[BoolKey.self]
#expect(bool == BoolKey.defaultValue)
#expect(env.description == "[]")

env[BoolKey.self] = bool
#expect(env.description == "[]")

env[BoolKey.self] = !bool
bool = env[BoolKey.self]
#expect(bool == !BoolKey.defaultValue)
#expect(env.description == "[]")

let value = 1
env[IntKey.self] = value
#expect(env.description == "[]")
}
#endif
var env = EnvironmentValues()
#expect(env.description == "[]")

Expand Down

0 comments on commit 11427d5

Please sign in to comment.