Skip to content

Commit

Permalink
Clean up docc broken link + tests (#107) 🚀
Browse files Browse the repository at this point in the history
* Clean up static property + docc broken link

* Added linux tests
  • Loading branch information
chicio authored Oct 24, 2024
1 parent 4f94cc3 commit a93decf
Show file tree
Hide file tree
Showing 43 changed files with 15 additions and 248 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
13 changes: 12 additions & 1 deletion Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,9 @@
452832E72044D28E00458375 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1600;
ORGANIZATIONNAME = "Fabrizio Duroni";
TargetAttributes = {
45966C942CBACF5000F841E7 = {
Expand Down Expand Up @@ -583,6 +584,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -645,6 +647,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -689,6 +692,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -726,6 +730,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "it.chicio.Demo-tvOS";
Expand Down Expand Up @@ -766,6 +771,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -806,6 +812,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "it.chicio.Demo-iOS";
Expand All @@ -830,6 +837,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo macOS/Preview Content\"";
DEVELOPMENT_TEAM = 5Y4K7JX2AU;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -867,6 +875,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Demo macOS/Preview Content\"";
DEVELOPMENT_TEAM = 5Y4K7JX2AU;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -914,6 +923,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -953,6 +963,7 @@
"@executable_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "it.chicio.Demo-watchOS";
Expand Down
6 changes: 2 additions & 4 deletions ID3TagEditor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
455CF98B2340C4E1004C880A /* PULL_REQUEST_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PULL_REQUEST_TEMPLATE.md; sourceTree = "<group>"; };
45925B99253B4EB4001C8D4F /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = codecov.yml; sourceTree = "<group>"; };
45925B9A253B5277001C8D4F /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = codecov.yml; sourceTree = "<group>"; };
459ABE822CBBCFAC00DCCD69 /* ID3TagEditor.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = ID3TagEditor.docc; sourceTree = "<group>"; };
45AB7193204AD842004A2239 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
45AB7194204AD842004A2239 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; };
45AB7195204AD842004A2239 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -193,7 +192,6 @@
452831BB2044C40700458375 = {
isa = PBXGroup;
children = (
459ABE822CBBCFAC00DCCD69 /* ID3TagEditor.docc */,
45925B99253B4EB4001C8D4F /* codecov.yml */,
45541C25205999A20025A8BF /* CHANGELOG.md */,
455CF98A2340C4D7004C880A /* CODE_OF_CONDUCT.md */,
Expand Down Expand Up @@ -1022,7 +1020,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
TVOS_DEPLOYMENT_TARGET = 15.0;
};
name = Debug;
};
Expand Down Expand Up @@ -1056,7 +1054,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 12.0;
TVOS_DEPLOYMENT_TARGET = 15.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
27 changes: 0 additions & 27 deletions Tests/Acceptance/ID3TagEditorAcceptanceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -895,33 +895,6 @@ struct ID3TagEditorAcceptanceTest {
#expect((id3Tag?.frames[.comment(.eng)] as? ID3FrameWithLocalizedContent)?.contentDescription == "")
#expect((id3Tag?.frames[.comment(.eng)] as? ID3FrameWithLocalizedContent)?.content == "ÜberStandard - UberNet.org")
}

static let allTests = [
("testFailWrongFilePathFilePath", testFailWrongFilePathFilePath),
("testReadTagV2", testReadTagV2),
("testParseTagV3", testParseTagV3),
("testReadTagV4", testReadTagV4),
("testReadTagV4WithImage", testReadTagV4WithImage),
("testReadAsMp3", testReadAsMp3),
("testReadCorruptedFile", testReadCorruptedFile),
("testReadUtf16String", testReadUtf16String),
("testWriteTagV2", testWriteTagV2),
("testWriteTagV3WhenItAlreadyExists", testWriteTagV3WhenItAlreadyExists),
("testWriteTagV3WithJpg", testWriteTagV3WithJpg),
("testWriteTagV3WithPng", testWriteTagV3WithPng),
("testWriteTagV3WithCustomPathThatDoesNotExists", testWriteTagV3WithCustomPathThatDoesNotExists),
("testWriteTagV3WithSamePath", testWriteTagV3WithSamePath),
("testWriteTagV3WithAdditionalData", testWriteTagV3WithAdditionalData),
("testWriteTagV3ToMp3AsData", testWriteTagV3ToMp3AsData),
("testWriteTagV4", testWriteTagV4),
("testWriteTagV4WithPng", testWriteTagV4WithPng),
("testWriteTagV4SynchsafeIntegers", testWriteTagV4SynchsafeIntegers),
("testWriteUnsynchronisedLyrics", testWriteUnsynchronisedLyrics),
("testWriteNewFramesV2", testWriteNewFramesV2),
("testWriteNewFramesV3", testWriteNewFramesV3),
("testWriteNewFramesV4", testWriteNewFramesV4),
("testCommentWithUTF8EncodingAndNoContentDescription", testCommentWithUTF8EncodingAndNoContentDescription)
]
}

// swiftlint:enable type_body_length
Expand Down
6 changes: 0 additions & 6 deletions Tests/Acceptance/ID3TagEditorWriteReadAcceptanceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,6 @@ struct ID3TagEditorWriteReadAcceptanceTest {
#expect(tagReader.iTunesPodcastID() == "PodcastID V4")
#expect(tagReader.iTunesPodcastKeywords() == "PodcastKeywords V4")
}

static let allTests = [
("testReadWritev2", testReadWritev2),
("testReadWritev3", testReadWritev3),
("testReadWritev4", testReadWritev4)
]
}

// swiftlint:enable type_body_length
Expand Down
4 changes: 0 additions & 4 deletions Tests/Common/PaddingAdderUsingNullCharTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@ struct PaddingAdderUsingNullCharTest {

#expect(contentWithPadding == [0x1, 0x1, 0x0])
}

static let allTests = [
("testAddPadding", testAddPadding)
]
}
4 changes: 0 additions & 4 deletions Tests/Common/PaddingRemoverUsingTrimming.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ struct PaddingRemoverUsingTrimmingTest {
PaddingRemoverUsingTrimming().removeFrom(string: "\0\0\0simple string\0\0\0")
)
}

static let allTests = [
("testRemovePadding", testRemovePadding)
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ struct UInt32ToByteArrayAdapterUsingUnsafePointerTest {
[0x11, 0x22, 0x33, 0x44]
)
}

static let allTests = [
("testAdapt32BitUnsignedInteger", testAdapt32BitUnsignedInteger)
]
}
9 changes: 0 additions & 9 deletions Tests/Create/ID3AttachedPicturesFrameCreatorsTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ struct ID3AttachedPicturesFramesCreatorTest {
0x00, 0x04, 0x00, 0x10, 0x10]
)
}

static let allTests = [
("frameCreationWithJpgForVersion2", frameCreationWithJpgForVersion2),
("frameCreationWithJpgForVersion3", frameCreationWithJpgForVersion3),
("frameCreationWithPngForAnotherTypeOfCover", frameCreationWithPngForAnotherTypeOfCover),
("frameCreationWithPngForVersion2", frameCreationWithPngForVersion2),
("frameCreationWithPngForVersion3", frameCreationWithPngForVersion3),
("noFrameCreationWhenThereIsNoImage", noFrameCreationWhenThereIsNoImage)
]
}


Expand Down
5 changes: 0 additions & 5 deletions Tests/Create/ID3DiscPositionFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,4 @@ struct ID3DiscPositionFrameCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testFrameCreationWhenThereIsADiscPosition", testFrameCreationWhenThereIsADiscPosition),
("testNoFrameCreationWhenThereIsNoDiscPosition", testNoFrameCreationWhenThereIsNoDiscPosition)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3FrameContentSizeCalculatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,4 @@ struct ID3FrameContentSizeCalculatorTest {

#expect(size == [0x3, 0x2])
}

static let allTests = [
("testContentCalculateSizeForVersion2", testContentCalculateSizeForVersion2),
("testContentCalculateSizeForVersion3", testContentCalculateSizeForVersion3)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3FrameFlagsCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ struct ID3FrameFlagsCreatorTest {
@Test func testFlagsForVersion2() {
#expect(ID3FrameFlagsCreator().createFor(version: .version2) == [])
}

static let allTests = [
("testFlagsForVersion2", testFlagsForVersion2),
("testFlagsForVersion3", testFlagsForVersion3)
]
}
4 changes: 0 additions & 4 deletions Tests/Create/ID3FrameFromStringContentCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ struct ID3FrameFromStringContentCreatorTest {

#expect(frameBytes == [0x01, 0x02] + "test".utf16ToBytes)
}

static let allTests = [
("testCreatorFrameFromStringContent", testCreatorFrameFromStringContent)
]
}
4 changes: 0 additions & 4 deletions Tests/Create/ID3FrameHeaderCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ struct ID3FrameHeaderCreatorTest {

#expect(header == [UInt8]("USLT".utf8) + [0x11, 0x00])
}

static let allTests = [
("create", create)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3FrameWithIntegerContentCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,4 @@ struct ID3FrameWithIntegerContentCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testNoFrameCreationWhenThereIsNoContent", testNoFrameCreationWhenThereIsNoContent),
("testFrameCreationWhenThereIsContent", testFrameCreationWhenThereIsContent)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3FrameWithStringContentCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,4 @@ struct ID3FrameWithStringContentCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testNoFrameCreationWhenThereIsNoFrameData", testNoFrameCreationWhenThereIsNoFrameData),
("testFrameCreationWhenThereIsFrameData", testFrameCreationWhenThereIsFrameData)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3FramesWithLocalizedContentCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,4 @@ struct ID3FramesWithLocalizedContentCreatorTest {
))
.build()
}

static let allTests = [
("testNothingIsCreatedWheLyricsDataIsNotSet", testNothingIsCreatedWheLyricsDataIsNotSet),
("testCreateFrameForValidData", testCreateFrameForValidData)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3GenreFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,4 @@ struct ID3GenreFrameCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testFrameCreationWhenThereIsAGenre", testFrameCreationWhenThereIsAGenre),
("testNoFrameCreationWhenThereIsNoGenre", testNoFrameCreationWhenThereIsNoGenre)
]
}
4 changes: 0 additions & 4 deletions Tests/Create/ID3ISO88591StringToByteAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@ struct ID3ISO88591StringToByteAdapterTest {

#expect(bytes == ENCODING + STRING)
}

static let allTests = [
("testEncodeStringToISO88591WithEncodingByte", testEncodeStringToISO88591WithEncodingByte)
]
}
6 changes: 0 additions & 6 deletions Tests/Create/ID3LocalizedFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,4 @@ struct ID3LocalizedFrameCreatorTest {
0xFE, 0x6C, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x63, 0x00, 0x73,
0x00])
}

static let allTests = [
("testCreatev2", testCreatev2),
("testCreatev3", testCreatev3),
("testCreatev4", testCreatev4)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3RecordingDateTimeFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ struct ID3RecordingDateTimeFrameCreatorTest {
#expect(timestampCreator.createFromRecordingDateTimeHasBeenCalled)
#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testFrameCreationWhenThereIsACompleteRecordingDateTime",
testFrameCreationWhenThereIsACompleteRecordingDateTime)
]
}
6 changes: 0 additions & 6 deletions Tests/Create/ID3RecordingDayMonthFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,4 @@ struct ID3RecordingDayMonthFrameCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testFrameCreationWhenThereIsADayAndAMonth", testFrameCreationWhenThereIsADayAndAMonth),
("testNoFrameCreationWhenThereIsNoDay", testNoFrameCreationWhenThereIsNoDay),
("testNoFrameCreationWhenThereIsNoMonth", testNoFrameCreationWhenThereIsNoMonth)
]
}
6 changes: 0 additions & 6 deletions Tests/Create/ID3TagCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,4 @@ struct ID3TagCreatorTest {
)
)
}

static let allTests = [
("testGenerateValidData", testGenerateValidData),
("testNoValidFrameData", testNoValidFrameData),
("testTagTooBig", testTagTooBig)
]
}
9 changes: 0 additions & 9 deletions Tests/Create/ID3TimestampCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,4 @@ struct ID3TimestampCreatorTest {

#expect(timestampCreator.createFrom(recordingDateTime: recordingTime) == nil)
}

static let allTests = [
("testCreateTimestampCorrectly", testCreateTimestampCorrectly),
("testNilDay", testNilDay),
("testNilMonth", testNilMonth),
("testNilYear", testNilYear),
("testNilHour", testNilHour),
("testNilMinute", testNilMinute)
]
}
5 changes: 0 additions & 5 deletions Tests/Create/ID3TrackPositionFrameCreatorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,4 @@ struct ID3TrackPositionCreatorTest {

#expect(newTagBytes == newFrameBytes)
}

static let allTests = [
("testFrameCreationWhenThereIsATrackPosition", testFrameCreationWhenThereIsATrackPosition),
("testNoFrameCreationWhenThereIsNoTrackPosition", testNoFrameCreationWhenThereIsNoTrackPosition)
]
}
4 changes: 0 additions & 4 deletions Tests/Create/ID3UTF16StringToByteAdapterTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,4 @@ struct ID3UTF16StringToByteAdapterTest {

#expect(bytes == ENCODING + BOM + STRING)
}

static let allTests = [
("testEncodeStringToUTF16WithEncodingByte", testEncodeStringToUTF16WithEncodingByte)
]
}
Loading

0 comments on commit a93decf

Please sign in to comment.