Skip to content

Commit

Permalink
Added linux tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chicio committed Oct 19, 2024
1 parent db5a556 commit 23864fa
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 80 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: Build Linux framework
run: |
swift build
swift test
- name: Build Linux Demo
run: |
cd Demo/Demo\ Ubuntu
Expand Down
9 changes: 0 additions & 9 deletions Tests/Mp3/Mp3FileReaderTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,4 @@ struct Mp3FileReaderTest {
// 10 bytes Tag + 34213 bytes according to the Tag Size in the file's ID3 Tag
#expect(id3TagData.count == 10 + 34213)
}

static let allTests = [
("testNotAnMP3FileWhenReadingEntireFile", testNotAnMP3FileWhenReadingEntireFile),
("testMP3FileWhenReadingEntireFile", testMP3FileWhenReadingEntireFile),
("testNotAnMP3fileWhenReadingID3Tag", testNotAnMP3fileWhenReadingID3Tag),
("testMP3fileWhenReadingID3Tag", testMP3fileWhenReadingID3Tag),
("testNonExistentMP3fileWhenReadingID3Tag", testNonExistentMP3fileWhenReadingID3Tag),
("testOnlyReadsID3Tag", testOnlyReadsID3Tag)
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,4 @@ struct ID3AttachedPictureFrameContentParsingOperationTest {
})
}
}

static let allTests = [
("testSetTagAttachedPictureJpg", testSetTagAttachedPictureJpg),
("testSetTagAttachedPicturePng", testSetTagAttachedPicturePng)
]
}
6 changes: 0 additions & 6 deletions Tests/Parse/ID3DiscPositionStringAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,4 @@ struct ID3DiscPositionStringAdapterTest {
#expect(discPosition.part == 0)
#expect(discPosition.total == nil)
}

static let allTests = [
("testAdaptNotANumberDiscPosition", testAdaptNotANumberDiscPosition),
("testAdaptDiscPositionWithoutTotalDiscs", testAdaptDiscPositionWithoutTotalDiscs),
("testAdaptDiscPositionWithTotalDiscs", testAdaptDiscPositionWithTotalDiscs)
]
}
6 changes: 0 additions & 6 deletions Tests/Parse/ID3FrameContentSizeParserTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,4 @@ import Testing
14
)
}

static let allTests = [
("testParseFrameContentSizeV2", testParseFrameContentSizeV2),
("testParseFrameContentSizeV3", testParseFrameContentSizeV3),
("testParseFrameContentSizeV4", testParseFrameContentSizeV4)
]
}
5 changes: 0 additions & 5 deletions Tests/Parse/ID3FrameSizeParserTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,4 @@ struct ID3FrameSizeParserTest {
mp3.length + ID3FrameConfiguration().headerSizeFor(version: .version3)
)
}

static let allTests = [
("testParseFrameContentSizeV2", testParseFrameContentSizeV2),
("testParseFrameContentSizeV3", testParseFrameContentSizeV3)
]
}
7 changes: 0 additions & 7 deletions Tests/Parse/ID3GenreStringAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,4 @@ import Testing
#expect(ID3GenreStringAdapter().adapt(genre: "(XXX)").identifier == nil)
#expect(ID3GenreStringAdapter().adapt(genre: "(XXX)").description == "(XXX)")
}

static let allTests = [
("testAdaptGenreWithDescription", testAdaptGenreWithDescription),
("testAdaptGenreWithoutDescription", testAdaptGenreWithoutDescription),
("testAdaptGenreWithoutGenreIdentifier", testAdaptGenreWithoutGenreIdentifier),
("testAdaptID3v3NewGenresNotNumeric", testAdaptID3v3NewGenresNotNumeric)
]
}
5 changes: 0 additions & 5 deletions Tests/Parse/ID3LocalizedFrameParsingOperationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,4 @@ struct ID3LocalizedFrameParsingOperationTest {
+ content
)
}

static let allTests = [
("testParsingValidFrame", testParsingValidFrame),
("testParsingInvalidLanguage", testParsingInvalidLanguage)
]
}
7 changes: 0 additions & 7 deletions Tests/Parse/ID3PictureTypeAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,4 @@ struct ID3PictureTypeAdapterTest {

#expect(id3PictureTypeAdapter.adapt(frame: frame, format: .png, version: .version3) == .frontCover)
}

static let allTests = [
("testExtractTypeFromV2TagJpg", testExtractTypeFromV2TagJpg),
("testExtractTypeFromV2TagPng", testExtractTypeFromV2TagPng),
("testExtractTypeFromV3TagJpg", testExtractTypeFromV3TagJpg),
("testExtractTypeFromV3TagPng", testExtractTypeFromV3TagPng)
]
}
5 changes: 0 additions & 5 deletions Tests/Parse/ID3RecordingTimestampOperationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,4 @@ struct ID3RecordingTimeFrameContentParsingOperationTest {
[0x03] + [UInt8]("2016".utf8)
)
}

static let allTests = [
("testframeContentValidTimestamp", testframeContentValidTimestamp),
("testframeContentWithYearInsteadOfTimestamp", testframeContentWithYearInsteadOfTimestamp)
]
}
8 changes: 0 additions & 8 deletions Tests/Parse/ID3StringContentParsingOperationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,4 @@ struct ID3StringContentParsingOperationTest {
[0x03] + [UInt8](":: π value ::".utf8)
)
}

static let allTests = [
("testFrameContentParsedV2", testFrameContentParsedV2),
("testFrameContentParsedV3", testFrameContentParsedV3),
("testFrameContentParsedV2utf16", testFrameContentParsedV2utf16),
("testFrameContentParsedV3utf16", testFrameContentParsedV3utf16),
("testFrameContentParsedV4utf8", testFrameContentParsedV4utf8)
]
}
5 changes: 0 additions & 5 deletions Tests/Parse/ID3TagSizeParserTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,4 @@ struct ID3TagSizeParserTest {
let mp3V23 = NSData(contentsOfFile: PathLoader().pathFor(name: "example-v23", fileType: "mp3"))!
#expect(ID3TagSizeParser().parse(data: mp3V23) == 245864)
}

static let allTests = [
("parseTagSizeV2", parseTagSizeV2),
("parseFrameContentSizeV3", parseTagSizeV3)
]
}
6 changes: 0 additions & 6 deletions Tests/Parse/ID3TagVersionParserTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,4 @@ struct ID3TagVersionParserTest {
)
#expect(.version3 == ID3TagVersionParser().parse(mp3: mp3WithV2Tag))
}

static let allTests = [
("testExtractVersion2", testExtractVersion2),
("testExtractVersion3", testExtractVersion3),
("testDefaultVersion", testDefaultVersion)
]
}
6 changes: 0 additions & 6 deletions Tests/Parse/ID3TrackPositionStringAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,4 @@ struct ID3TrackPositionStringAdapterTest {
#expect(trackPosition.part == 0)
#expect(trackPosition.total == nil)
}

static let allTests = [
("testAdaptNotANumberTrackPosition", testAdaptNotANumberTrackPosition),
("testAdaptTrackPositionWithoutTotalTracks", testAdaptTrackPositionWithoutTotalTracks),
("testAdaptTrackPositionWithTotalTrack", testAdaptTrackPositionWithTotalTrack)
]
}

0 comments on commit 23864fa

Please sign in to comment.