Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Add testing #7

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 37 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

*.DS_Store
*/Pods
*/Podfile.lock
## User settings
xcuserdata/

## Build generated
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/

## Various settings
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -19,15 +21,11 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM
Expand All @@ -42,6 +40,12 @@ playground.xcworkspace
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
.swiftpm

.build/

# CocoaPods
Expand All @@ -50,23 +54,40 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Example/Pods/
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build
Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

# macOS stuff
**/.DS_Store
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Marshal",
"repositoryURL": "https://github.com/utahiosmac/Marshal",
"state": {
"branch": null,
"revision": "bbd811be9b78352e74970d1c2c652e87c83ce51b",
"version": "1.2.8"
}
}
]
},
"version": 1
}
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftTwitch",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "SwiftTwitch",
targets: ["SwiftTwitch"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/utahiosmac/Marshal", from: "1.2.7")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "SwiftTwitch",
dependencies: ["Marshal"]),
.testTarget(
name: "SwiftTwitchTests",
dependencies: ["SwiftTwitch"]),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/29/18.
//

import Foundation
import Marshal


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/29/18.
//

import Foundation
import Marshal

/// `GameAnalyticsReportData` holds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/28/18.
//

import Foundation
import Marshal

/// `GetBitsLeaderboardData` is a class that is used to provide a robust interface for data received
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/29/18.
//

import Foundation
import Marshal

/// `ClipData` is a class that encapsulates all of the information of a single returned clip from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/29/18.
//

import Foundation
import Marshal

/// `CreateClipInfoData` is a class that encapsulates all of the information of a single returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/30/18.
//

import Foundation
import Marshal

/// `PostedStreamMarkerData` is a class that is used to provide a robust interface for stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/30/18.
//

import Foundation
import Marshal

/// `UnpostedStreamMarkerData` is a class that is used to provide a robust interface for stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/30/18.
//

import Foundation
import Marshal

/// `StreamData` is a class that encapsulates all of the information of a single returned stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/30/18.
//

import Foundation
import Marshal

/// `UserData` is a class that encapsulates all of the information of a single user on Twitch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 12/31/18.
//

import Foundation
import Marshal

/// `UserFollowData` is a class that encapsulates a single data point of a following relationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Christopher Perkins on 1/1/19.
//

import Foundation
import Marshal

/// `VideoData` defines the data that belongs to a specific Video as retrieved from the `New Twitch
Expand Down
4 changes: 2 additions & 2 deletions SwiftTwitch.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ usage document of SwiftTwitch, please view the GitHub README available here: htt
s.tvos.deployment_target = '13.0'
s.macos.deployment_target = '10.14'

s.source_files = 'SwiftTwitch/Classes/**/*'
s.source_files = 'Sources/SwiftTwitch/Classes/**/*'

s.dependency 'Marshal', '~> 1.2.7'
s.swift_version = '4.2'
s.swift_version = '5.3'
end
7 changes: 7 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

import SwiftTwitchTests

var tests = [XCTestCaseEntry]()
tests += SwiftTwitchTests.allTests()
XCTMain(tests)
15 changes: 15 additions & 0 deletions Tests/SwiftTwitchTests/SwiftTwitchTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
@testable import SwiftTwitch

final class SwiftTwitchTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertTrue(true)
}

static var allTests = [
("testExample", testExample),
]
}
9 changes: 9 additions & 0 deletions Tests/SwiftTwitchTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest

#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SwiftTwitchTests.allTests),
]
}
#endif