Skip to content

Commit

Permalink
Create GraphQL library from SwiftPM package 📦
Browse files Browse the repository at this point in the history
  • Loading branch information
slashmo committed Nov 14, 2018
1 parent 61c865b commit 17aad74
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// swift-tools-version:4.2

import PackageDescription

let package = Package(
name: "GraphQL",
products: [
.library(
name: "GraphQL",
targets: ["GraphQL"]
)
],
dependencies: [],
targets: [
.target(
name: "GraphQL",
dependencies: []
),
.testTarget(
name: "GraphQLTests",
dependencies: ["GraphQL"]
)
]
)
1 change: 1 addition & 0 deletions Sources/GraphQL/GraphQL.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct GraphQL {}
8 changes: 8 additions & 0 deletions Tests/GraphQLTests/GraphQLTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest
@testable import GraphQL

final class GraphQLTests: XCTestCase {
func testExample() {
XCTAssertTrue(!false)
}
}
15 changes: 15 additions & 0 deletions Tests/GraphQLTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest

extension GraphQLTests {
static let __allTests = [
("testExample", testExample),
]
}

#if !os(macOS)
public func __allTests() -> [XCTestCaseEntry] {
return [
testCase(GraphQLTests.__allTests),
]
}
#endif
8 changes: 8 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest

import GraphQLTests

var tests = [XCTestCaseEntry]()
tests += GraphQLTests.__allTests()

XCTMain(tests)

0 comments on commit 17aad74

Please sign in to comment.