Skip to content

Commit

Permalink
Fixing tests for Linux 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
chicio committed Oct 11, 2024
1 parent cf18fec commit 212ba92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
8 changes: 0 additions & 8 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@
45F78CB62CB9411D00AD985F /* Demo tvOS */,
457517C82193CDAF00627A34 /* Demo Ubuntu */,
45F78C292CB939C700AD985F /* Demo watchOS */,
45F7914C2CB9465500AD985F /* Frameworks */,
452832F02044D28E00458375 /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -341,13 +340,6 @@
path = "Demo Ubuntu";
sourceTree = "<group>";
};
45F7914C2CB9465500AD985F /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down
20 changes: 9 additions & 11 deletions Tests/Acceptance/ID3TagEditorAcceptanceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ class ID3TagEditorAcceptanceTest: XCTestCase {
func testParseTagV3() throws {
let path = PathLoader().pathFor(name: "example-cover-png", fileType: "png")
let cover = try Data(contentsOf: URL(fileURLWithPath: path))

let id3Tag = try id3TagEditor.read(from: PathLoader().pathFor(name: "example-v23-png", fileType: "mp3"))

let id3Tag = try id3TagEditor.read(from: PathLoader().pathFor(name: "example-v23", fileType: "mp3"))

XCTAssertEqual(id3Tag?.properties.version, .version3)
XCTAssertEqual((id3Tag?.frames[.title] as? ID3FrameWithStringContent)?.content, "A New title")
XCTAssertEqual((id3Tag?.frames[.album] as? ID3FrameWithStringContent)?.content, "A New Album")
XCTAssertEqual((id3Tag?.frames[.artist] as? ID3FrameWithStringContent)?.content, "A New Artist")
XCTAssertEqual((id3Tag?.frames[.title] as? ID3FrameWithStringContent)?.content, "A title")
XCTAssertEqual((id3Tag?.frames[.album] as? ID3FrameWithStringContent)?.content, "An album")
XCTAssertEqual((id3Tag?.frames[.artist] as? ID3FrameWithStringContent)?.content, "An artist")
XCTAssertEqual((id3Tag?.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.picture, cover)
XCTAssertEqual((id3Tag?.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.type, .frontCover)
XCTAssertEqual((id3Tag?.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.format, .png)
Expand Down Expand Up @@ -158,15 +157,15 @@ class ID3TagEditorAcceptanceTest: XCTestCase {
let path = PathLoader().pathFor(name: "example-cover-png", fileType: "png")
let cover = try Data(contentsOf: URL(fileURLWithPath: path))
let mp3 = try Data(
contentsOf: URL(fileURLWithPath: PathLoader().pathFor(name: "example-v23-png", fileType: "mp3"))
contentsOf: URL(fileURLWithPath: PathLoader().pathFor(name: "example-v23", fileType: "mp3"))
)

let id3Tag = try id3TagEditor.read(mp3: mp3)

XCTAssertEqual(id3Tag?.properties.version, .version3)
XCTAssertEqual((id3Tag?.frames[.title] as? ID3FrameWithStringContent)?.content, "A New title")
XCTAssertEqual((id3Tag?.frames[.album] as? ID3FrameWithStringContent)?.content, "A New Album")
XCTAssertEqual((id3Tag?.frames[.artist] as? ID3FrameWithStringContent)?.content, "A New Artist")
XCTAssertEqual((id3Tag?.frames[.title] as? ID3FrameWithStringContent)?.content, "A title")
XCTAssertEqual((id3Tag?.frames[.album] as? ID3FrameWithStringContent)?.content, "An album")
XCTAssertEqual((id3Tag?.frames[.artist] as? ID3FrameWithStringContent)?.content, "An artist")
XCTAssertEqual((id3Tag?.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.picture, cover)
XCTAssertEqual((id3Tag?.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.format, .png)
}
Expand Down Expand Up @@ -840,7 +839,6 @@ class ID3TagEditorAcceptanceTest: XCTestCase {
("testFailWrongFilePathFilePath", testFailWrongFilePathFilePath),
("testReadTagV2", testReadTagV2),
("testParseTagV3", testParseTagV3),
("testParseTagV3AdditionalData", testParseTagV3AdditionalData),
("testReadTagV4", testReadTagV4),
("testReadTagV4WithImage", testReadTagV4WithImage),
("testReadAsMp3", testReadAsMp3),
Expand Down

0 comments on commit 212ba92

Please sign in to comment.