Skip to content

Commit

Permalink
Move Robolectric test dependencies from skip-foundation to skip-unit;…
Browse files Browse the repository at this point in the history
… eliminate redundant import of AndroidJUnit4 test runner
  • Loading branch information
marcprux committed Oct 15, 2024
1 parent 60261f9 commit 38c639b
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.10

Released 2024-10-15


## 1.1.9

Released 2024-10-15
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let package = Package(
.library(name: "SkipFoundation", targets: ["SkipFoundation"]),
],
dependencies: [
.package(url: "https://source.skip.tools/skip.git", from: "1.1.10"),
.package(url: "https://source.skip.tools/skip.git", from: "1.1.11"),
.package(url: "https://source.skip.tools/skip-lib.git", from: "1.1.3"),
],
targets: [
Expand Down
23 changes: 3 additions & 20 deletions Sources/SkipFoundation/Skip/skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ settings:
contents:
- block: 'create("testLibs")'
contents:
- 'version("robolectric", "4.13")'
- 'library("robolectric", "org.robolectric", "robolectric").versionRef("robolectric")'
- 'library("json", "org.json", "json").version("20231013")'
- 'library("json", "org.json", "json").version("20240303")'

# the blocks to add to the build.gradle.kts
build:
Expand All @@ -23,22 +21,7 @@ build:
contents:
- 'implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))'
- 'implementation("com.squareup.okhttp3:okhttp")'
- 'implementation("org.commonmark:commonmark:0.22.0")'
- 'implementation("org.commonmark:commonmark-ext-gfm-strikethrough:0.22.0")'
- 'implementation("org.commonmark:commonmark:0.23.0")'
- 'implementation("org.commonmark:commonmark-ext-gfm-strikethrough:0.23.0")'
# needed to run local tests that use the JSON parser with a full Robolectric shadow environment
- 'testImplementation(testLibs.json)'
- 'testImplementation(testLibs.robolectric)'
- 'testImplementation(testLibs.androidx.test.core)'
- 'testImplementation(testLibs.androidx.test.rules)'
- 'testImplementation(testLibs.androidx.test.ext.junit)'
- 'androidTestImplementation(testLibs.androidx.test.core)'
- 'androidTestImplementation(testLibs.androidx.test.rules)'
- 'androidTestImplementation(testLibs.androidx.test.ext.junit)'

- block: 'tasks.withType<Test>().configureEach'
contents:
- 'systemProperties.put("robolectric.logging", "stdout")'
- 'systemProperties.put("robolectric.graphicsMode", "NATIVE")'
- block: 'testLogging'
contents:
- 'this.showStandardStreams = true'
1 change: 0 additions & 1 deletion Tests/SkipFoundationTests/CoreLibs/TestUserDefaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import XCTest
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
class TestUserDefaults : XCTestCase {

func test_createUserDefaults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import XCTest
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
class TestJSONSerialization : XCTestCase {

let supportedEncodings: [String.Encoding] = [
Expand Down
1 change: 0 additions & 1 deletion Tests/SkipFoundationTests/Foundation/BundleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Foundation
import OSLog
import XCTest

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
@available(macOS 13, iOS 16, watchOS 10, tvOS 16, *)
final class BundleTests: XCTestCase {
let logger: Logger = Logger(subsystem: "test", category: "BundleTests")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import Foundation
import XCTest

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
@available(macOS 11, iOS 14, watchOS 7, tvOS 14, *)
final class FileManagerTests: XCTestCase {
func testFileManager() throws {
Expand Down
1 change: 0 additions & 1 deletion Tests/SkipFoundationTests/Foundation/LocaleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import Foundation
import XCTest

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
@available(macOS 13, iOS 16, watchOS 10, tvOS 16, *)
final class LocaleTests: XCTestCase {
func testLanguageCodes() throws {
Expand Down
1 change: 0 additions & 1 deletion Tests/SkipFoundationTests/SkipFoundationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import XCTest
@testable import func SkipFoundation.SkipFoundationPublicModuleName
#endif

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
final class SkipFoundationTests: XCTestCase {
let logger: Logger = Logger(subsystem: "test", category: "SkipFoundationTests")

Expand Down
1 change: 0 additions & 1 deletion Tests/SkipFoundationTests/System/TestBundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ class BundlePlayground {
}
#endif

// SKIP INSERT: @org.junit.runner.RunWith(androidx.test.ext.junit.runners.AndroidJUnit4::class)
class TestBundle : XCTestCase {

func test_paths() {
Expand Down

0 comments on commit 38c639b

Please sign in to comment.