Skip to content

Commit

Permalink
Migrate tests to inside library itself
Browse files Browse the repository at this point in the history
  • Loading branch information
dcvz committed Oct 20, 2023
1 parent 030c400 commit e887dfc
Show file tree
Hide file tree
Showing 56 changed files with 14 additions and 317 deletions.
277 changes: 0 additions & 277 deletions Example/SwiftAudio.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions Example/Tests/Info.plist

This file was deleted.

10 changes: 8 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ let package = Package(
targets: [
.target(
name: "SwiftAudioEx",
dependencies: [],
path: "SwiftAudioEx/Classes")
dependencies: []),
.testTarget(
name: "SwiftAudioExTests",
dependencies: ["SwiftAudioEx"],
resources: [
.process("Resources")
]
),
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion SwiftAudioEx.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ DESC

s.ios.deployment_target = '11.0'
s.swift_version = '5.0'
s.source_files = 'SwiftAudioEx/Classes/**/*'
s.source_files = 'Sources/SwiftAudioEx/**/*'
end
Empty file removed SwiftAudioEx/Assets/.gitkeep
Empty file.
Empty file removed SwiftAudioEx/Classes/.gitkeep
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
//
// Sources.swift
// SwiftAudio_Tests
//
// Created by Jørgen Henrichsen on 05/08/2018.
// Copyright © 2018 CocoaPods. All rights reserved.
//

import Foundation
import SwiftAudioEx
import UIKit

struct Source {
static let path: String = Bundle.main.path(forResource: "TestSound", ofType: "m4a")!
static let path: String = Bundle.module.path(forResource: "TestSound", ofType: "m4a")!
static let url: URL = URL(fileURLWithPath: Source.path)

static func getAudioItem() -> AudioItem {
Expand All @@ -20,7 +12,7 @@ struct Source {
}

struct ShortSource {
static let path: String = Bundle.main.path(forResource: "ShortTestSound", ofType: "m4a")!
static let path: String = Bundle.module.path(forResource: "ShortTestSound", ofType: "m4a")!
static let url: URL = URL(fileURLWithPath: ShortSource.path)

static func getAudioItem() -> AudioItem {
Expand All @@ -29,7 +21,7 @@ struct ShortSource {
}

struct LongSource {
static let path: String = Bundle.main.path(forResource: "WAV-MP3", ofType: "wav")!
static let path: String = Bundle.module.path(forResource: "WAV-MP3", ofType: "wav")!
static let url: URL = URL(fileURLWithPath: LongSource.path)

static func getAudioItem() -> AudioItem {
Expand All @@ -38,7 +30,7 @@ struct LongSource {
}

struct FiveSecondSource {
static let path: String = Bundle.main.path(forResource: "five_seconds", ofType: "m4a")!
static let path: String = Bundle.module.path(forResource: "five_seconds", ofType: "m4a")!
static let url: URL = URL(fileURLWithPath: FiveSecondSource.path)

static func getAudioItem() -> AudioItem {
Expand All @@ -47,7 +39,7 @@ struct FiveSecondSource {
}

struct FiveSecondSourceWithInitialTimeOfFourSeconds {
static let path: String = Bundle.main.path(forResource: "five_seconds", ofType: "m4a")!
static let path: String = Bundle.module.path(forResource: "five_seconds", ofType: "m4a")!
static let url: URL = URL(fileURLWithPath: FiveSecondSource.path)

static func getAudioItem() -> AudioItem {
Expand Down

0 comments on commit e887dfc

Please sign in to comment.