Do away with some ObjC test infra
This commit is contained in:
parent
f05c7fd129
commit
6ff76dd7e6
@ -813,7 +813,6 @@
|
||||
663BA3202A4CF96B004B9A43 /* MessageBodyDisplayConfigurations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 663BA31F2A4CF96B004B9A43 /* MessageBodyDisplayConfigurations.swift */; };
|
||||
663D6A7C292319BC00CABC49 /* ConversationPickerFailedRecipientsSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 663D6A7B292319BC00CABC49 /* ConversationPickerFailedRecipientsSheet.swift */; };
|
||||
6640639E294D20A900997E0B /* OutgoingCallEventSyncMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6640639D294D20A900997E0B /* OutgoingCallEventSyncMessage.swift */; };
|
||||
6640DD5E2ACCCDC000CE9A8C /* RegistrationStateChangeManagerObjcTestUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6640DD5D2ACCCDC000CE9A8C /* RegistrationStateChangeManagerObjcTestUtil.swift */; };
|
||||
6640DD602ACDBEC500CE9A8C /* IncomingPniChangeNumberProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6640DD5F2ACDBEC500CE9A8C /* IncomingPniChangeNumberProcessor.swift */; };
|
||||
6640DD632ACDD5DE00CE9A8C /* SVRLocalStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6640DD622ACDD5DE00CE9A8C /* SVRLocalStorage.swift */; };
|
||||
664160D029A6D60A00F5BA85 /* ChatServiceAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 664160CF29A6D60A00F5BA85 /* ChatServiceAuth.swift */; };
|
||||
@ -1798,6 +1797,9 @@
|
||||
D9C7CEB428EB8495001E87B6 /* ExperienceUpgrade.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C7CEB328EB8495001E87B6 /* ExperienceUpgrade.swift */; };
|
||||
D9C7CECB28EBC09C001E87B6 /* ExperienceUpgradeManifest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C7CECA28EBC09C001E87B6 /* ExperienceUpgradeManifest.swift */; };
|
||||
D9C7CECF28ECC043001E87B6 /* NSAttributedString+SSK.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C7CECE28ECC043001E87B6 /* NSAttributedString+SSK.swift */; };
|
||||
D9C964092BE44D700058F143 /* XCTest+Thenable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C964072BE44D510058F143 /* XCTest+Thenable.swift */; };
|
||||
D9C964102BE451CE0058F143 /* TSMessageStorageTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C9640F2BE451CE0058F143 /* TSMessageStorageTest.swift */; };
|
||||
D9C964142BE45A030058F143 /* SignedPreKeyDeletionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C964132BE45A030058F143 /* SignedPreKeyDeletionTests.swift */; };
|
||||
D9CA5BF729B3F61E00D9AAD1 /* LegacyChangePhoneNumber+ChangeTokens.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CA5BF629B3F61E00D9AAD1 /* LegacyChangePhoneNumber+ChangeTokens.swift */; };
|
||||
D9CA8AB02B698DFF00787167 /* DeletedCallRecordCleanupManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CA8AAF2B698DFF00787167 /* DeletedCallRecordCleanupManager.swift */; };
|
||||
D9CA8AB32B6ACC0600787167 /* DeletedCallRecordCleanupManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9CA8AB22B6ACC0600787167 /* DeletedCallRecordCleanupManagerTest.swift */; };
|
||||
@ -1937,7 +1939,6 @@
|
||||
F9426253289B1B5500460798 /* OWSErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261E6289B1B5400460798 /* OWSErrorTest.swift */; };
|
||||
F9426255289B1B5500460798 /* UnfairLockTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261E8289B1B5400460798 /* UnfairLockTest.swift */; };
|
||||
F9426256289B1B5500460798 /* NSData+ImageTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261E9289B1B5400460798 /* NSData+ImageTest.swift */; };
|
||||
F9426258289B1B5500460798 /* TSMessageStorageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F94261EB289B1B5400460798 /* TSMessageStorageTests.m */; };
|
||||
F9426259289B1B5500460798 /* RemoteConfigManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261EC289B1B5400460798 /* RemoteConfigManagerTests.swift */; };
|
||||
F942625B289B1B5500460798 /* OWSFormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261EE289B1B5400460798 /* OWSFormatTest.swift */; };
|
||||
F942625D289B1B5500460798 /* RefineryTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261F0289B1B5400460798 /* RefineryTest.swift */; };
|
||||
@ -1949,16 +1950,12 @@
|
||||
F9426269289B1B5500460798 /* MathOWSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261FC289B1B5400460798 /* MathOWSTests.swift */; };
|
||||
F942626A289B1B5500460798 /* ViewOnceMessagesTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F94261FD289B1B5400460798 /* ViewOnceMessagesTest.swift */; };
|
||||
F942626C289B1B5500460798 /* SignalAccountFinderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426200289B1B5400460798 /* SignalAccountFinderTest.swift */; };
|
||||
F942626D289B1B5500460798 /* SignedPreKeyDeletionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F9426201289B1B5400460798 /* SignedPreKeyDeletionTests.m */; };
|
||||
F942626F289B1B5500460798 /* SSKBaseTestObjC.m in Sources */ = {isa = PBXBuildFile; fileRef = F9426203289B1B5500460798 /* SSKBaseTestObjC.m */; };
|
||||
F9426270289B1B5500460798 /* SSKSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426204289B1B5500460798 /* SSKSwiftTests.swift */; };
|
||||
F9426272289B1B5500460798 /* PhoneNumberUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F9426207289B1B5500460798 /* PhoneNumberUtilTest.m */; };
|
||||
F9426273289B1B5500460798 /* BlockingManagerStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426208289B1B5500460798 /* BlockingManagerStateTests.swift */; };
|
||||
F9426274289B1B5500460798 /* PhoneNumberTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426209289B1B5500460798 /* PhoneNumberTest.swift */; };
|
||||
F9426277289B1B5600460798 /* PhoneNumberUtilTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F942620C289B1B5500460798 /* PhoneNumberUtilTest.swift */; };
|
||||
F942627A289B1B5600460798 /* OWSRecipientIdentityTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F942620F289B1B5500460798 /* OWSRecipientIdentityTest.swift */; };
|
||||
F942627E289B1B5600460798 /* SignalRecipientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426213289B1B5500460798 /* SignalRecipientTest.swift */; };
|
||||
F942627F289B1B5600460798 /* TSThreadTest.m in Sources */ = {isa = PBXBuildFile; fileRef = F9426214289B1B5500460798 /* TSThreadTest.m */; };
|
||||
F9426283289B1B5600460798 /* BlockingManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426218289B1B5500460798 /* BlockingManagerTests.swift */; };
|
||||
F9426288289B1B5600460798 /* TestProtocolRunnerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F942621E289B1B5500460798 /* TestProtocolRunnerTest.swift */; };
|
||||
F9426289289B1B5600460798 /* TSOutgoingMessageTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426220289B1B5500460798 /* TSOutgoingMessageTest.swift */; };
|
||||
@ -1980,7 +1977,7 @@
|
||||
F942629F289B1B5600460798 /* OWSUDManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426237289B1B5500460798 /* OWSUDManagerTest.swift */; };
|
||||
F94262A0289B1B5600460798 /* SMKSecretSessionCipherTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426238289B1B5500460798 /* SMKSecretSessionCipherTest.swift */; };
|
||||
F94262A1289B1B5600460798 /* SignalServiceAddressTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426239289B1B5500460798 /* SignalServiceAddressTest.swift */; };
|
||||
F94262A2289B1B5600460798 /* SSKBaseTestSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = F942623A289B1B5500460798 /* SSKBaseTestSwift.swift */; };
|
||||
F94262A2289B1B5600460798 /* SSKBaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F942623A289B1B5500460798 /* SSKBaseTest.swift */; };
|
||||
F9426D18299FEC8900357352 /* RegistrationTransferChoiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9426D17299FEC8900357352 /* RegistrationTransferChoiceViewController.swift */; };
|
||||
F9427EAB297F1E88008EF0AC /* SpamReportingToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9427EAA297F1E88008EF0AC /* SpamReportingToken.swift */; };
|
||||
F9427EAE297F1EE3008EF0AC /* SpamReportingTokenTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9427EAD297F1EE3008EF0AC /* SpamReportingTokenTest.swift */; };
|
||||
@ -3705,7 +3702,6 @@
|
||||
663BA31F2A4CF96B004B9A43 /* MessageBodyDisplayConfigurations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageBodyDisplayConfigurations.swift; sourceTree = "<group>"; };
|
||||
663D6A7B292319BC00CABC49 /* ConversationPickerFailedRecipientsSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConversationPickerFailedRecipientsSheet.swift; sourceTree = "<group>"; };
|
||||
6640639D294D20A900997E0B /* OutgoingCallEventSyncMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutgoingCallEventSyncMessage.swift; sourceTree = "<group>"; };
|
||||
6640DD5D2ACCCDC000CE9A8C /* RegistrationStateChangeManagerObjcTestUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationStateChangeManagerObjcTestUtil.swift; sourceTree = "<group>"; };
|
||||
6640DD5F2ACDBEC500CE9A8C /* IncomingPniChangeNumberProcessor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IncomingPniChangeNumberProcessor.swift; sourceTree = "<group>"; };
|
||||
6640DD622ACDD5DE00CE9A8C /* SVRLocalStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SVRLocalStorage.swift; sourceTree = "<group>"; };
|
||||
664160CF29A6D60A00F5BA85 /* ChatServiceAuth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatServiceAuth.swift; sourceTree = "<group>"; };
|
||||
@ -4703,6 +4699,9 @@
|
||||
D9C7CEB328EB8495001E87B6 /* ExperienceUpgrade.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperienceUpgrade.swift; sourceTree = "<group>"; };
|
||||
D9C7CECA28EBC09C001E87B6 /* ExperienceUpgradeManifest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExperienceUpgradeManifest.swift; sourceTree = "<group>"; };
|
||||
D9C7CECE28ECC043001E87B6 /* NSAttributedString+SSK.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+SSK.swift"; sourceTree = "<group>"; };
|
||||
D9C964072BE44D510058F143 /* XCTest+Thenable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "XCTest+Thenable.swift"; sourceTree = "<group>"; };
|
||||
D9C9640F2BE451CE0058F143 /* TSMessageStorageTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TSMessageStorageTest.swift; sourceTree = "<group>"; };
|
||||
D9C964132BE45A030058F143 /* SignedPreKeyDeletionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignedPreKeyDeletionTests.swift; sourceTree = "<group>"; };
|
||||
D9CA5BF629B3F61E00D9AAD1 /* LegacyChangePhoneNumber+ChangeTokens.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LegacyChangePhoneNumber+ChangeTokens.swift"; sourceTree = "<group>"; };
|
||||
D9CA8AAF2B698DFF00787167 /* DeletedCallRecordCleanupManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletedCallRecordCleanupManager.swift; sourceTree = "<group>"; };
|
||||
D9CA8AB22B6ACC0600787167 /* DeletedCallRecordCleanupManagerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletedCallRecordCleanupManagerTest.swift; sourceTree = "<group>"; };
|
||||
@ -4848,7 +4847,6 @@
|
||||
F94261D3289B1B5400460798 /* OWSRequestFactoryTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSRequestFactoryTest.swift; sourceTree = "<group>"; };
|
||||
F94261D4289B1B5400460798 /* HTMLMetadataTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTMLMetadataTests.swift; sourceTree = "<group>"; };
|
||||
F94261D5289B1B5400460798 /* MessageSendJobQueueTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSendJobQueueTest.swift; sourceTree = "<group>"; };
|
||||
F94261D6289B1B5400460798 /* SSKBaseTestObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSKBaseTestObjC.h; path = SignalServiceKit/tests/SSKBaseTestObjC.h; sourceTree = SOURCE_ROOT; };
|
||||
F94261D9289B1B5400460798 /* OWSIdentityManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSIdentityManagerTests.swift; sourceTree = "<group>"; };
|
||||
F94261DA289B1B5400460798 /* TestModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestModelTests.swift; sourceTree = "<group>"; };
|
||||
F94261DB289B1B5400460798 /* SDSKeyValueStoreTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SDSKeyValueStoreTest.swift; sourceTree = "<group>"; };
|
||||
@ -4861,7 +4859,6 @@
|
||||
F94261E6289B1B5400460798 /* OWSErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSErrorTest.swift; sourceTree = "<group>"; };
|
||||
F94261E8289B1B5400460798 /* UnfairLockTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnfairLockTest.swift; sourceTree = "<group>"; };
|
||||
F94261E9289B1B5400460798 /* NSData+ImageTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSData+ImageTest.swift"; sourceTree = "<group>"; };
|
||||
F94261EB289B1B5400460798 /* TSMessageStorageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSMessageStorageTests.m; sourceTree = "<group>"; };
|
||||
F94261EC289B1B5400460798 /* RemoteConfigManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteConfigManagerTests.swift; sourceTree = "<group>"; };
|
||||
F94261EE289B1B5400460798 /* OWSFormatTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSFormatTest.swift; sourceTree = "<group>"; };
|
||||
F94261F0289B1B5400460798 /* RefineryTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RefineryTest.swift; sourceTree = "<group>"; };
|
||||
@ -4873,16 +4870,12 @@
|
||||
F94261FC289B1B5400460798 /* MathOWSTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MathOWSTests.swift; sourceTree = "<group>"; };
|
||||
F94261FD289B1B5400460798 /* ViewOnceMessagesTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewOnceMessagesTest.swift; sourceTree = "<group>"; };
|
||||
F9426200289B1B5400460798 /* SignalAccountFinderTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalAccountFinderTest.swift; sourceTree = "<group>"; };
|
||||
F9426201289B1B5400460798 /* SignedPreKeyDeletionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SignedPreKeyDeletionTests.m; sourceTree = "<group>"; };
|
||||
F9426203289B1B5500460798 /* SSKBaseTestObjC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSKBaseTestObjC.m; path = SignalServiceKit/tests/SSKBaseTestObjC.m; sourceTree = SOURCE_ROOT; };
|
||||
F9426204289B1B5500460798 /* SSKSwiftTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSKSwiftTests.swift; path = SignalServiceKit/tests/SSKSwiftTests.swift; sourceTree = SOURCE_ROOT; };
|
||||
F9426207289B1B5500460798 /* PhoneNumberUtilTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneNumberUtilTest.m; sourceTree = "<group>"; };
|
||||
F9426208289B1B5500460798 /* BlockingManagerStateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockingManagerStateTests.swift; sourceTree = "<group>"; };
|
||||
F9426209289B1B5500460798 /* PhoneNumberTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhoneNumberTest.swift; sourceTree = "<group>"; };
|
||||
F942620C289B1B5500460798 /* PhoneNumberUtilTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhoneNumberUtilTest.swift; sourceTree = "<group>"; };
|
||||
F942620F289B1B5500460798 /* OWSRecipientIdentityTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSRecipientIdentityTest.swift; sourceTree = "<group>"; };
|
||||
F9426213289B1B5500460798 /* SignalRecipientTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalRecipientTest.swift; sourceTree = "<group>"; };
|
||||
F9426214289B1B5500460798 /* TSThreadTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSThreadTest.m; sourceTree = "<group>"; };
|
||||
F9426218289B1B5500460798 /* BlockingManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockingManagerTests.swift; sourceTree = "<group>"; };
|
||||
F942621E289B1B5500460798 /* TestProtocolRunnerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestProtocolRunnerTest.swift; sourceTree = "<group>"; };
|
||||
F9426220289B1B5500460798 /* TSOutgoingMessageTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TSOutgoingMessageTest.swift; sourceTree = "<group>"; };
|
||||
@ -4904,7 +4897,7 @@
|
||||
F9426237289B1B5500460798 /* OWSUDManagerTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSUDManagerTest.swift; sourceTree = "<group>"; };
|
||||
F9426238289B1B5500460798 /* SMKSecretSessionCipherTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMKSecretSessionCipherTest.swift; sourceTree = "<group>"; };
|
||||
F9426239289B1B5500460798 /* SignalServiceAddressTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalServiceAddressTest.swift; sourceTree = "<group>"; };
|
||||
F942623A289B1B5500460798 /* SSKBaseTestSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSKBaseTestSwift.swift; path = SignalServiceKit/tests/SSKBaseTestSwift.swift; sourceTree = SOURCE_ROOT; };
|
||||
F942623A289B1B5500460798 /* SSKBaseTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SSKBaseTest.swift; path = SignalServiceKit/tests/SSKBaseTest.swift; sourceTree = SOURCE_ROOT; };
|
||||
F9426D17299FEC8900357352 /* RegistrationTransferChoiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationTransferChoiceViewController.swift; sourceTree = "<group>"; };
|
||||
F9427EAA297F1E88008EF0AC /* SpamReportingToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpamReportingToken.swift; sourceTree = "<group>"; };
|
||||
F9427EAD297F1EE3008EF0AC /* SpamReportingTokenTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpamReportingTokenTest.swift; sourceTree = "<group>"; };
|
||||
@ -7410,7 +7403,6 @@
|
||||
6646573E2AC3B9190099DE1C /* MockRegistrationStateChangeManager.swift */,
|
||||
6646573A2AC388C70099DE1C /* RegistrationStateChangeManager.swift */,
|
||||
6646573C2AC3894D0099DE1C /* RegistrationStateChangeManagerImpl.swift */,
|
||||
6640DD5D2ACCCDC000CE9A8C /* RegistrationStateChangeManagerObjcTestUtil.swift */,
|
||||
);
|
||||
path = RegistrationStateChangeManager;
|
||||
sourceTree = "<group>";
|
||||
@ -7510,7 +7502,7 @@
|
||||
5050A87A2B76EEC500E9BFA4 /* PreKeyIdTest.swift */,
|
||||
C1E5891C2A69E77B00ECAF66 /* PreKeyTaskTestMocks.swift */,
|
||||
C1E5891A2A66D67C00ECAF66 /* PreKeyTaskTests.swift */,
|
||||
F9426201289B1B5400460798 /* SignedPreKeyDeletionTests.m */,
|
||||
D9C964132BE45A030058F143 /* SignedPreKeyDeletionTests.swift */,
|
||||
);
|
||||
path = PreKeys;
|
||||
sourceTree = "<group>";
|
||||
@ -9859,7 +9851,7 @@
|
||||
F9CAC77E29199B9200EEC1DE /* StringTest.swift */,
|
||||
C1F09B9E2BB307E100F9E7F5 /* TransformingInputStreamTests.swift */,
|
||||
C1E307412BA4D388009F015B /* TransformingOutputStreamTests.swift */,
|
||||
F94261EB289B1B5400460798 /* TSMessageStorageTests.m */,
|
||||
D9C9640F2BE451CE0058F143 /* TSMessageStorageTest.swift */,
|
||||
F94261E8289B1B5400460798 /* UnfairLockTest.swift */,
|
||||
6600F34D298C81E300B1EDB7 /* UnknownEnumCodableTest.swift */,
|
||||
F9D5BFD02979B027001737E5 /* URLPathComponentsTest.swift */,
|
||||
@ -9906,7 +9898,6 @@
|
||||
5011D96F2A0429B6000FE8E5 /* ThreadMergerTest.swift */,
|
||||
F972180128DCFDF100113D9F /* TSContactThreadTest.swift */,
|
||||
F908AA7F28CE7F8D00472E68 /* TSGroupThreadTest.swift */,
|
||||
F9426214289B1B5500460798 /* TSThreadTest.m */,
|
||||
506ABE6C2A43B2C0008844D1 /* UserProfileMergerTest.swift */,
|
||||
);
|
||||
name = Contacts;
|
||||
@ -10190,10 +10181,8 @@
|
||||
D99840C2297A0DC400F7ED6D /* Usernames */,
|
||||
F94261E4289B1B5400460798 /* Util */,
|
||||
724D47B12B97BE73001BE973 /* ZkParams */,
|
||||
F94261D6289B1B5400460798 /* SSKBaseTestObjC.h */,
|
||||
F9426203289B1B5500460798 /* SSKBaseTestObjC.m */,
|
||||
F942623A289B1B5500460798 /* SSKBaseTestSwift.swift */,
|
||||
F9426204289B1B5500460798 /* SSKSwiftTests.swift */,
|
||||
F942623A289B1B5500460798 /* SSKBaseTest.swift */,
|
||||
D9C964072BE44D510058F143 /* XCTest+Thenable.swift */,
|
||||
);
|
||||
path = tests;
|
||||
sourceTree = "<group>";
|
||||
@ -14131,7 +14120,6 @@
|
||||
6691E7F22996E9BC0032A68A /* RegistrationSessionManagerMock.swift in Sources */,
|
||||
6646573B2AC388C70099DE1C /* RegistrationStateChangeManager.swift in Sources */,
|
||||
6646573D2AC3894D0099DE1C /* RegistrationStateChangeManagerImpl.swift in Sources */,
|
||||
6640DD5E2ACCCDC000CE9A8C /* RegistrationStateChangeManagerObjcTestUtil.swift in Sources */,
|
||||
F9C5CCB0289453B300548EEE /* RemoteAttestation.swift in Sources */,
|
||||
F9C5CE17289453B400548EEE /* RemoteConfigManager.swift in Sources */,
|
||||
D98DD86028EE53B00089333E /* RemoteMegaphoneModel.swift in Sources */,
|
||||
@ -14641,7 +14629,7 @@
|
||||
F9B93CDC28E1FE3500B3F8A0 /* SignalProxyTest.swift in Sources */,
|
||||
F942627E289B1B5600460798 /* SignalRecipientTest.swift in Sources */,
|
||||
F94262A1289B1B5600460798 /* SignalServiceAddressTest.swift in Sources */,
|
||||
F942626D289B1B5500460798 /* SignedPreKeyDeletionTests.m in Sources */,
|
||||
D9C964142BE45A030058F143 /* SignedPreKeyDeletionTests.swift in Sources */,
|
||||
F94262A0289B1B5600460798 /* SMKSecretSessionCipherTest.swift in Sources */,
|
||||
F9426296289B1B5600460798 /* SMKTestUtils.swift in Sources */,
|
||||
F9426298289B1B5600460798 /* SMKUDAccessKeyTest.swift in Sources */,
|
||||
@ -14649,12 +14637,10 @@
|
||||
F9427EAE297F1EE3008EF0AC /* SpamReportingTokenTest.swift in Sources */,
|
||||
6664B9AB2A314EBD008EF74B /* SpoilerRevealStateTests.swift in Sources */,
|
||||
F9613CDE2981F15700894B55 /* SqliteUtilTest.swift in Sources */,
|
||||
F942626F289B1B5500460798 /* SSKBaseTestObjC.m in Sources */,
|
||||
F94262A2289B1B5600460798 /* SSKBaseTestSwift.swift in Sources */,
|
||||
F94262A2289B1B5600460798 /* SSKBaseTest.swift in Sources */,
|
||||
C167F1E52A7162D700D4A9AF /* SSKKyberPreKeyStoreTest.swift in Sources */,
|
||||
C1CD0E402A6B37BF00307F1A /* SSKPreKeyStoreTests.swift in Sources */,
|
||||
F9426250289B1B5500460798 /* SSKSignedPreKeyStoreTest.swift in Sources */,
|
||||
F9426270289B1B5500460798 /* SSKSwiftTests.swift in Sources */,
|
||||
F942628D289B1B5600460798 /* StickerManagerTest.swift in Sources */,
|
||||
F942628E289B1B5600460798 /* StickerPackInfoTest.swift in Sources */,
|
||||
7254655E2BA032A900EABFD2 /* StorageServiceContactTest.swift in Sources */,
|
||||
@ -14684,10 +14670,9 @@
|
||||
D9AD1D9528B9955C00B42E6F /* TSInfoMessage+GroupUpdateType+NSAttributedStringTest.swift in Sources */,
|
||||
667AF9E02B4C6377008AEE5D /* TSInfoMessage+LegacyPersistablegroupUpdateItemTest.swift in Sources */,
|
||||
D9CD40622A155C4800545803 /* TSInfoMessage+PersistableGroupUpdateItemTest.swift in Sources */,
|
||||
F9426258289B1B5500460798 /* TSMessageStorageTests.m in Sources */,
|
||||
D9C964102BE451CE0058F143 /* TSMessageStorageTest.swift in Sources */,
|
||||
F942628A289B1B5600460798 /* TSMessageTest.swift in Sources */,
|
||||
F9426289289B1B5600460798 /* TSOutgoingMessageTest.swift in Sources */,
|
||||
F942627F289B1B5600460798 /* TSThreadTest.m in Sources */,
|
||||
F942628F289B1B5600460798 /* TypingIndicatorMessageTest.swift in Sources */,
|
||||
F9426255289B1B5500460798 /* UnfairLockTest.swift in Sources */,
|
||||
6600F34F298C823C00B1EDB7 /* UnknownEnumCodableTest.swift in Sources */,
|
||||
@ -14699,6 +14684,7 @@
|
||||
506ABE6E2A43B2FE008844D1 /* UserProfileMergerTest.swift in Sources */,
|
||||
D9B95A9D29E894A600D7CB95 /* ValidatableModel.swift in Sources */,
|
||||
F942626A289B1B5500460798 /* ViewOnceMessagesTest.swift in Sources */,
|
||||
D9C964092BE44D700058F143 /* XCTest+Thenable.swift in Sources */,
|
||||
724D47B22B97BE96001BE973 /* ZkParamsMigratorTest.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
//
|
||||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
#if TESTABLE_BUILD
|
||||
|
||||
@objcMembers
|
||||
public class RegistrationStateChangeManagerObjcTestUtil: NSObject {
|
||||
|
||||
private override init() { super.init() }
|
||||
|
||||
public static func registerForTests() {
|
||||
DependenciesBridge.shared.db.write { tx in
|
||||
(DependenciesBridge.shared.registrationStateChangeManager as? RegistrationStateChangeManagerImpl)?.registerForTests(
|
||||
localIdentifiers: .forUnitTests,
|
||||
tx: tx
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class TSAttachmentDownloadManagerTest: SSKBaseTestSwift {
|
||||
class TSAttachmentDownloadManagerTest: SSKBaseTest {
|
||||
|
||||
func testEnumerateMessagesWithLegacyAttachments() throws {
|
||||
func makeRandomAttachment(tx: SDSAnyWriteTransaction) -> TSAttachment {
|
||||
|
||||
@ -120,23 +120,6 @@ public class TSIncomingMessageBuilder: TSMessageBuilder {
|
||||
)
|
||||
}
|
||||
|
||||
#if TESTABLE_BUILD
|
||||
@objc
|
||||
static func withDefaultsObjc(
|
||||
thread: TSThread,
|
||||
messageBody: String,
|
||||
timestamp: UInt64,
|
||||
authorAci: AciObjC
|
||||
) -> TSIncomingMessageBuilder {
|
||||
return .withDefaults(
|
||||
thread: thread,
|
||||
timestamp: timestamp,
|
||||
authorAci: authorAci.wrappedAciValue,
|
||||
messageBody: messageBody
|
||||
)
|
||||
}
|
||||
#endif
|
||||
|
||||
private var hasBuilt = false
|
||||
|
||||
@objc
|
||||
|
||||
@ -1,112 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import "SDSDatabaseStorage+Objc.h"
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import "SSKSignedPreKeyStore.h"
|
||||
#import "SignedPrekeyRecord.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
@interface SignedPreKeyDeletionTests : SSKBaseTestObjC
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@interface SSKSignedPreKeyStore (Tests)
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation SSKSignedPreKeyStore (Tests)
|
||||
|
||||
- (nullable SignedPreKeyRecord *)loadSignedPreKey:(int)signedPreKeyId
|
||||
{
|
||||
__block SignedPreKeyRecord *_Nullable result;
|
||||
[self.databaseStorage readWithBlock:^(SDSAnyReadTransaction *transaction) {
|
||||
result = [self loadSignedPreKey:signedPreKeyId transaction:transaction];
|
||||
}];
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation SignedPreKeyDeletionTests
|
||||
|
||||
- (SSKSignedPreKeyStore *)signedPreKeyStore
|
||||
{
|
||||
return [[SSKSignedPreKeyStore alloc] initForIdentity:OWSIdentityACI];
|
||||
}
|
||||
|
||||
- (void)testSignedPreKeyDeletion
|
||||
{
|
||||
int days = 40;
|
||||
|
||||
SignedPreKeyRecord *justUploadedSignedPreKeyRecord;
|
||||
for (int i = 0; i <= days; i += 5) { // 5 keys are generated: [0, 10, ..., 40]
|
||||
int secondsAgo = (i - days) * 24 * 60 * 60;
|
||||
NSAssert(secondsAgo <= 0, @"Time in past must be negative");
|
||||
NSDate *generatedAt = [NSDate dateWithTimeIntervalSinceNow:secondsAgo];
|
||||
SignedPreKeyRecord *record = [[SignedPreKeyRecord alloc] initWithId:i
|
||||
keyPair:[ECKeyPair generateKeyPair]
|
||||
signature:[NSData new]
|
||||
generatedAt:generatedAt];
|
||||
DatabaseStorageWrite(self.databaseStorage, ^(SDSAnyWriteTransaction *transaction) {
|
||||
[self.signedPreKeyStore storeSignedPreKey:i signedPreKeyRecord:record transaction:transaction];
|
||||
});
|
||||
justUploadedSignedPreKeyRecord = record;
|
||||
}
|
||||
|
||||
DatabaseStorageWrite(self.databaseStorage, ^(SDSAnyWriteTransaction *transaction) {
|
||||
[self.signedPreKeyStore cullSignedPreKeyRecordsWithJustUploadedSignedPreKey:justUploadedSignedPreKeyRecord
|
||||
transaction:transaction];
|
||||
});
|
||||
|
||||
XCTAssertNil([self.signedPreKeyStore loadSignedPreKey:0]);
|
||||
XCTAssertNil([self.signedPreKeyStore loadSignedPreKey:5]);
|
||||
XCTAssertNil([self.signedPreKeyStore loadSignedPreKey:10]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:15]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:20]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:25]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:30]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:35]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:40]);
|
||||
}
|
||||
|
||||
- (void)testSignedPreKeyDeletionKeepsSomeOldKeys
|
||||
{
|
||||
SignedPreKeyRecord *justUploadedSignedPreKeyRecord;
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
// All these keys will be considered "old", since they were created more than 30 days ago.
|
||||
int secondsAgo = (i - 40) * 24 * 60 * 60;
|
||||
NSAssert(secondsAgo <= 0, @"Time in past must be negative");
|
||||
NSDate *generatedAt = [NSDate dateWithTimeIntervalSinceNow:secondsAgo];
|
||||
SignedPreKeyRecord *record = [[SignedPreKeyRecord alloc] initWithId:i
|
||||
keyPair:[ECKeyPair generateKeyPair]
|
||||
signature:[NSData new]
|
||||
generatedAt:generatedAt];
|
||||
DatabaseStorageWrite(self.databaseStorage, ^(SDSAnyWriteTransaction *transaction) {
|
||||
[self.signedPreKeyStore storeSignedPreKey:i signedPreKeyRecord:record transaction:transaction];
|
||||
});
|
||||
justUploadedSignedPreKeyRecord = record;
|
||||
}
|
||||
|
||||
DatabaseStorageWrite(self.databaseStorage, ^(SDSAnyWriteTransaction *transaction) {
|
||||
[self.signedPreKeyStore cullSignedPreKeyRecordsWithJustUploadedSignedPreKey:justUploadedSignedPreKeyRecord
|
||||
transaction:transaction];
|
||||
});
|
||||
|
||||
// We need to keep 3 "old" keys, plus the "current" key
|
||||
XCTAssertNil([self.signedPreKeyStore loadSignedPreKey:1]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:2]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:3]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:4]);
|
||||
XCTAssertNotNil([self.signedPreKeyStore loadSignedPreKey:5]);
|
||||
}
|
||||
|
||||
@end
|
||||
@ -0,0 +1,110 @@
|
||||
//
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import SignalCoreKit
|
||||
import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class SignedPreKeyDeletionTests: SSKBaseTest {
|
||||
private lazy var signedPreKeyStore: SSKSignedPreKeyStore = {
|
||||
return SSKSignedPreKeyStore(for: .aci)
|
||||
}()
|
||||
|
||||
func testSignedPreKeyDeletion() {
|
||||
let maxDaysAgo: Int = 40
|
||||
|
||||
var justUploadedRecord: SignedPreKeyRecord!
|
||||
for daysAgo in stride(from: 0, through: maxDaysAgo, by: 5) {
|
||||
let secondsAgo: TimeInterval = Double(daysAgo - maxDaysAgo) * kDayInterval
|
||||
owsAssert(secondsAgo <= 0, "Time in past must be negative!")
|
||||
|
||||
let record = SignedPreKeyRecord(
|
||||
id: Int32(daysAgo),
|
||||
keyPair: .generateKeyPair(),
|
||||
signature: Data(),
|
||||
generatedAt: Date(timeIntervalSinceNow: secondsAgo)
|
||||
)
|
||||
|
||||
write { tx in
|
||||
signedPreKeyStore.storeSignedPreKey(
|
||||
Int32(daysAgo),
|
||||
signedPreKeyRecord: record,
|
||||
tx: tx.asV2Write
|
||||
)
|
||||
}
|
||||
|
||||
justUploadedRecord = record
|
||||
}
|
||||
|
||||
write { tx in
|
||||
signedPreKeyStore.cullSignedPreKeyRecords(
|
||||
justUploadedSignedPreKey: justUploadedRecord,
|
||||
tx: tx.asV2Write
|
||||
)
|
||||
}
|
||||
|
||||
XCTAssertNil(signedPreKeyStore.loadSignedPreKey(id: 0))
|
||||
XCTAssertNil(signedPreKeyStore.loadSignedPreKey(id: 5))
|
||||
XCTAssertNil(signedPreKeyStore.loadSignedPreKey(id: 10))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 15))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 20))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 25))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 30))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 35))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 40))
|
||||
}
|
||||
|
||||
func testSignedPreKeyDeletionKeepsSomeOldKeys() {
|
||||
var justUploadedRecord: SignedPreKeyRecord!
|
||||
for idx in (1...5) {
|
||||
// All these keys will be considered "old", since they were created
|
||||
// more than 30 days ago.
|
||||
let secondsAgo: TimeInterval = Double(idx - 40) * kDayInterval
|
||||
owsAssert(secondsAgo <= 0, "Time in past must be negative!")
|
||||
|
||||
let record = SignedPreKeyRecord(
|
||||
id: Int32(idx),
|
||||
keyPair: .generateKeyPair(),
|
||||
signature: Data(),
|
||||
generatedAt: Date(timeIntervalSinceNow: secondsAgo)
|
||||
)
|
||||
|
||||
write { tx in
|
||||
signedPreKeyStore.storeSignedPreKey(
|
||||
Int32(idx),
|
||||
signedPreKeyRecord: record,
|
||||
tx: tx.asV2Write
|
||||
)
|
||||
}
|
||||
|
||||
justUploadedRecord = record
|
||||
}
|
||||
|
||||
write { tx in
|
||||
signedPreKeyStore.cullSignedPreKeyRecords(
|
||||
justUploadedSignedPreKey: justUploadedRecord,
|
||||
tx: tx.asV2Write
|
||||
)
|
||||
}
|
||||
|
||||
// We need to keep 3 "old" keys, plus the "current" key.
|
||||
XCTAssertNil(signedPreKeyStore.loadSignedPreKey(id: 1))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 2))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 3))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 4))
|
||||
XCTAssertNotNil(signedPreKeyStore.loadSignedPreKey(id: 5))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
|
||||
private extension SSKSignedPreKeyStore {
|
||||
func loadSignedPreKey(id: Int32) -> SignedPreKeyRecord? {
|
||||
return databaseStorage.read { tx in
|
||||
return loadSignedPreKey(id, transaction: tx)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class SignalAccountFinderTest: SSKBaseTestSwift {
|
||||
class SignalAccountFinderTest: SSKBaseTest {
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Create local account.
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class OutgoingCallEventSyncMessageSerializationTest: SSKBaseTestSwift {
|
||||
final class OutgoingCallEventSyncMessageSerializationTest: SSKBaseTest {
|
||||
/// ``OutgoingCallEventSyncMessage`` used to be defined in ObjC. This test
|
||||
/// contains a hardcoded base64url-encoded representation of an instance of
|
||||
/// that class that was archived:
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class OutgoingGroupCallUpdateMessageSerializationTest: SSKBaseTestSwift {
|
||||
final class OutgoingGroupCallUpdateMessageSerializationTest: SSKBaseTest {
|
||||
/// Confirms that an ``OutgoingGroupCallUpdateMessage`` (de)serializes.
|
||||
func testGroupCallUpdateMessageRoundTrip() throws {
|
||||
databaseStorage.write { tx in
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class BlockingManagerStateTests: SSKBaseTestSwift {
|
||||
class BlockingManagerStateTests: SSKBaseTest {
|
||||
var dut = BlockingManager.State._testing_createEmpty()
|
||||
|
||||
override func setUp() {
|
||||
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class BlockingManagerTests: SSKBaseTestSwift {
|
||||
class BlockingManagerTests: SSKBaseTest {
|
||||
// Some tests will use this to simulate the state as seen by another process
|
||||
// If working correctly, state should be reloaded
|
||||
var remoteState = BlockingManager.State._testing_createEmpty()
|
||||
|
||||
@ -10,7 +10,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class OWSRecipientIdentityTest: SSKBaseTestSwift {
|
||||
class OWSRecipientIdentityTest: SSKBaseTest {
|
||||
private lazy var localAci = Aci.randomForTesting()
|
||||
private lazy var aliceAci = Aci.randomForTesting()
|
||||
private lazy var bobAci = Aci.randomForTesting()
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
//
|
||||
|
||||
#import "PhoneNumberUtil.h"
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface PhoneNumberUtilTest : XCTestCase
|
||||
@end
|
||||
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class SignalRecipientTest: SSKBaseTestSwift {
|
||||
class SignalRecipientTest: SSKBaseTest {
|
||||
|
||||
private lazy var localAci = Aci.randomForTesting()
|
||||
private lazy var localPhoneNumber = E164("+16505550199")!
|
||||
|
||||
@ -7,7 +7,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class TSContactThreadTest: SSKBaseTestSwift {
|
||||
class TSContactThreadTest: SSKBaseTest {
|
||||
private func contactThread() -> TSContactThread {
|
||||
TSContactThread.getOrCreateThread(contactAddress: SignalServiceAddress.randomForTesting())
|
||||
}
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import "TSAttachmentStream.h"
|
||||
#import "TSContactThread.h"
|
||||
#import "TSIncomingMessage.h"
|
||||
#import "TSOutgoingMessage.h"
|
||||
#import "TestAppContext.h"
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
@interface TSThreadTest : SSKBaseTestObjC
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation TSThreadTest
|
||||
|
||||
- (NSUInteger)numberOfInteractionsInThread:(TSThread *)thread transaction:(SDSAnyReadTransaction *)transaction
|
||||
{
|
||||
InteractionFinder *finder = [[InteractionFinder alloc] initWithThreadUniqueId:thread.uniqueId];
|
||||
__block NSUInteger result = 0;
|
||||
[finder enumerateInteractionIdsWithTransaction:transaction
|
||||
error:NULL
|
||||
block:^(NSString *uniqueId, BOOL *stop) { result += 1; }];
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)testDeletingThreadDeletesInteractions
|
||||
{
|
||||
AciObjC *aci = [[AciObjC alloc] initWithAciString:@"00000000-0000-4000-8000-000000000000"];
|
||||
TSContactThread *thread =
|
||||
[[TSContactThread alloc] initWithContactAddress:[[SignalServiceAddress alloc] initWithServiceIdObjC:aci]];
|
||||
[self writeWithBlock:^(SDSAnyWriteTransaction *transaction) { [thread anyInsertWithTransaction:transaction]; }];
|
||||
|
||||
[self readWithBlock:^(SDSAnyReadTransaction *transaction) {
|
||||
XCTAssertEqual(0, [self numberOfInteractionsInThread:thread transaction:transaction]);
|
||||
}];
|
||||
|
||||
TSIncomingMessageBuilder *incomingMessageBuilder =
|
||||
[TSIncomingMessageBuilder withDefaultsObjcWithThread:thread
|
||||
messageBody:@"Incoming message body"
|
||||
timestamp:10000
|
||||
authorAci:aci];
|
||||
TSIncomingMessage *incomingMessage = [incomingMessageBuilder build];
|
||||
[self writeWithBlock:^(
|
||||
SDSAnyWriteTransaction *transaction) { [incomingMessage anyInsertWithTransaction:transaction]; }];
|
||||
|
||||
TSOutgoingMessageBuilder *messageBuilder =
|
||||
[TSOutgoingMessageBuilder outgoingMessageBuilderWithThread:thread messageBody:@"outgoing message body"];
|
||||
messageBuilder.timestamp = 20000;
|
||||
TSOutgoingMessage *outgoingMessage = [messageBuilder buildWithSneakyTransaction];
|
||||
[self writeWithBlock:^(
|
||||
SDSAnyWriteTransaction *transaction) { [outgoingMessage anyInsertWithTransaction:transaction]; }];
|
||||
|
||||
[self readWithBlock:^(SDSAnyReadTransaction *transaction) {
|
||||
XCTAssertEqual(2, [self numberOfInteractionsInThread:thread transaction:transaction]);
|
||||
}];
|
||||
|
||||
[self writeWithBlock:^(
|
||||
SDSAnyWriteTransaction *transaction) { [thread softDeleteThreadWithTransaction:transaction]; }];
|
||||
[self readWithBlock:^(SDSAnyReadTransaction *transaction) {
|
||||
XCTAssertEqual(0, [self numberOfInteractionsInThread:thread transaction:transaction]);
|
||||
XCTAssertEqual(0, [TSInteraction anyCountWithTransaction:transaction]);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -15,7 +15,7 @@ private extension Aci {
|
||||
static let aci3 = Aci.randomForTesting()
|
||||
}
|
||||
|
||||
class GroupModelsTest: SSKBaseTestSwift {
|
||||
class GroupModelsTest: SSKBaseTest {
|
||||
|
||||
func testGroupMembershipChangingFullMembers() {
|
||||
var builder1 = GroupMembership.Builder()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class DeliveryReceiptContextTests: SSKBaseTestSwift {
|
||||
class DeliveryReceiptContextTests: SSKBaseTest {
|
||||
func testExecutesDifferentMessages() throws {
|
||||
let aliceRecipient = SignalServiceAddress(phoneNumber: "+12345678900")
|
||||
var timestamp: UInt64?
|
||||
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class DisappearingMessageFinderTest: SSKBaseTestSwift {
|
||||
final class DisappearingMessageFinderTest: SSKBaseTest {
|
||||
private var finder: DisappearingMessagesFinder!
|
||||
private let now: UInt64 = 1700000000000
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class EditManagerTests: SSKBaseTestSwift {
|
||||
class EditManagerTests: SSKBaseTest {
|
||||
var db: DB!
|
||||
var authorAci: Aci!
|
||||
var thread: TSThread!
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
@testable import SignalServiceKit
|
||||
import XCTest
|
||||
|
||||
class TSMessageTest: SSKBaseTestSwift {
|
||||
class TSMessageTest: SSKBaseTest {
|
||||
private var thread: TSThread!
|
||||
|
||||
override func setUp() {
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class TSOutgoingMessageTest: SSKBaseTestSwift {
|
||||
class TSOutgoingMessageTest: SSKBaseTest {
|
||||
private var identityManager: OWSIdentityManager { DependenciesBridge.shared.identityManager }
|
||||
|
||||
override func setUp() {
|
||||
|
||||
@ -21,7 +21,7 @@ class MockSSKPreferences: LinkPreviewManagerImpl.Shims.SSKPreferences {
|
||||
}
|
||||
}
|
||||
|
||||
class OWSLinkPreviewTest: SSKBaseTestSwift {
|
||||
class OWSLinkPreviewTest: SSKBaseTest {
|
||||
let shouldRunNetworkTests = false
|
||||
|
||||
var mockDB: MockDB!
|
||||
|
||||
@ -7,7 +7,7 @@ import XCTest
|
||||
@testable import SignalServiceKit
|
||||
import LibSignalClient
|
||||
|
||||
class MessageDecryptionTest: SSKBaseTestSwift {
|
||||
class MessageDecryptionTest: SSKBaseTest {
|
||||
let localE164Identifier = "+13235551234"
|
||||
let localAci = UUID()
|
||||
let localPni = UUID()
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class MessagePipelineSupervisorTest: SSKBaseTestSwift {
|
||||
class MessagePipelineSupervisorTest: SSKBaseTest {
|
||||
|
||||
var dut: MessagePipelineSupervisor! = nil
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
import GRDB
|
||||
import LibSignalClient
|
||||
|
||||
class MessageProcessingIntegrationTest: SSKBaseTestSwift {
|
||||
class MessageProcessingIntegrationTest: SSKBaseTest {
|
||||
|
||||
let localE164Identifier = "+13235551234"
|
||||
let localAci = Aci.randomForTesting()
|
||||
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class MessageSendLogTests: SSKBaseTestSwift {
|
||||
class MessageSendLogTests: SSKBaseTest {
|
||||
private var messageSendLog: MessageSendLog { SSKEnvironment.shared.messageSendLogRef }
|
||||
|
||||
func testStoreAndRetrieveValidPayload() throws {
|
||||
|
||||
@ -7,7 +7,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class OWSDisappearingMessagesJobTest: SSKBaseTestSwift {
|
||||
final class OWSDisappearingMessagesJobTest: SSKBaseTest {
|
||||
private func message(
|
||||
withBody body: String,
|
||||
expiresInSeconds: UInt32,
|
||||
|
||||
@ -9,7 +9,7 @@ import SignalCoreKit
|
||||
import LibSignalClient
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class OWSUDManagerTest: SSKBaseTestSwift {
|
||||
class OWSUDManagerTest: SSKBaseTest {
|
||||
|
||||
private var udManagerImpl: OWSUDManagerImpl {
|
||||
return SSKEnvironment.shared.udManager as! OWSUDManagerImpl
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
import SignalServiceKit
|
||||
|
||||
class OutgoingGroupUpdateMessageTest: SSKBaseTestSwift {
|
||||
class OutgoingGroupUpdateMessageTest: SSKBaseTest {
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
tsAccountManager.registerForTests(withLocalNumber: "+12225550101", uuid: UUID(), pni: UUID())
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
import SignalServiceKit
|
||||
|
||||
class OWSOutgoingReactionMessageTest: SSKBaseTestSwift {
|
||||
class OWSOutgoingReactionMessageTest: SSKBaseTest {
|
||||
private lazy var reactionMessage: OWSOutgoingReactionMessage = {
|
||||
write { transaction in
|
||||
let thread = TSContactThread.getOrCreateThread(
|
||||
|
||||
@ -891,7 +891,7 @@ class SignalServiceAddressTest: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
class SignalServiceAddress2Test: SSKBaseTestSwift {
|
||||
class SignalServiceAddress2Test: SSKBaseTest {
|
||||
func testPersistence() throws {
|
||||
struct TestCase {
|
||||
var originalAddress: SignalServiceAddress
|
||||
|
||||
@ -8,7 +8,7 @@ import Foundation
|
||||
import SignalCoreKit
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class StickerManagerTest: SSKBaseTestSwift {
|
||||
class StickerManagerTest: SSKBaseTest {
|
||||
|
||||
func testFirstEmoji() {
|
||||
XCTAssertNil(StickerManager.firstEmoji(inEmojiString: nil))
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
@testable import SignalServiceKit
|
||||
import XCTest
|
||||
|
||||
class NSAttributedStringInGroupUpdateCopyTest: SSKBaseTestSwift {
|
||||
class NSAttributedStringInGroupUpdateCopyTest: SSKBaseTest {
|
||||
private func assertEqual(_ one: NSAttributedString, _ two: NSAttributedString) {
|
||||
XCTAssertEqual(one, two)
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import LibSignalClient
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class TestProtocolRunnerTest: SSKBaseTestSwift {
|
||||
class TestProtocolRunnerTest: SSKBaseTest {
|
||||
|
||||
var aliceClient: FakeSignalClient!
|
||||
var bobClient: FakeSignalClient!
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
import SignalServiceKit
|
||||
|
||||
class TypingIndicatorMessageTest: SSKBaseTestSwift {
|
||||
class TypingIndicatorMessageTest: SSKBaseTest {
|
||||
private func makeThread(transaction: SDSAnyWriteTransaction) -> TSThread {
|
||||
TSContactThread.getOrCreateThread(
|
||||
withContactAddress: SignalServiceAddress(phoneNumber: "+12223334444"),
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class MessageSenderJobQueueTest: SSKBaseTestSwift {
|
||||
class MessageSenderJobQueueTest: SSKBaseTest {
|
||||
private var fakeMessageSender: FakeMessageSender {
|
||||
SSKEnvironment.shared.messageSenderRef as! FakeMessageSender
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class SSKMessageSenderJobRecordTest: SSKBaseTestSwift {
|
||||
class SSKMessageSenderJobRecordTest: SSKBaseTest {
|
||||
|
||||
func test_savedVisibleMessage() {
|
||||
let message = OutgoingMessageFactory().create()
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class OWSRequestFactoryTest: SSKBaseTestSwift {
|
||||
class OWSRequestFactoryTest: SSKBaseTest {
|
||||
private func getUdAccessKey() throws -> SMKUDAccessKey {
|
||||
let profileKey = Data(count: Int(kAES256_KeyByteLength))
|
||||
let result = try? SMKUDAccessKey(profileKey: profileKey)
|
||||
|
||||
37
SignalServiceKit/tests/SSKBaseTest.swift
Normal file
37
SignalServiceKit/tests/SSKBaseTest.swift
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
import CocoaLumberjack
|
||||
|
||||
public class SSKBaseTest: XCTestCase {
|
||||
public override func setUp() {
|
||||
DDLog.add(DDTTYLogger.sharedInstance!)
|
||||
SetCurrentAppContext(TestAppContext(), true)
|
||||
MockSSKEnvironment.activate()
|
||||
}
|
||||
|
||||
public override func tearDown() {
|
||||
MockSSKEnvironment.flushAndWait()
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
public func read(_ block: (SDSAnyReadTransaction) -> Void) {
|
||||
return databaseStorage.read(block: block)
|
||||
}
|
||||
|
||||
public func write<T>(_ block: (SDSAnyWriteTransaction) -> T) -> T {
|
||||
return databaseStorage.write(block: block)
|
||||
}
|
||||
|
||||
public func write<T>(_ block: (SDSAnyWriteTransaction) throws -> T) rethrows -> T {
|
||||
try databaseStorage.write(block: block)
|
||||
}
|
||||
|
||||
public func asyncWrite(_ block: @escaping (SDSAnyWriteTransaction) -> Void) {
|
||||
return databaseStorage.asyncWrite(block: block)
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SDSAnyReadTransaction;
|
||||
@class SDSAnyWriteTransaction;
|
||||
|
||||
#ifdef TESTABLE_BUILD
|
||||
|
||||
@interface SSKBaseTestObjC : XCTestCase
|
||||
|
||||
- (void)readWithBlock:(void (^)(SDSAnyReadTransaction *transaction))block;
|
||||
- (void)writeWithBlock:(void (^)(SDSAnyWriteTransaction *transaction))block;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,52 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import "SDSDatabaseStorage+Objc.h"
|
||||
#import "TestAppContext.h"
|
||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
||||
#import <CocoaLumberjack/DDTTYLogger.h>
|
||||
#import <SignalCoreKit/OWSAsserts.h>
|
||||
#import <SignalCoreKit/OWSLogs.h>
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#ifdef TESTABLE_BUILD
|
||||
|
||||
@implementation SSKBaseTestObjC
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
|
||||
[DDLog addLogger:DDTTYLogger.sharedInstance];
|
||||
|
||||
SetCurrentAppContext([TestAppContext new], true);
|
||||
|
||||
[MockSSKEnvironment activate];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
[MockSSKEnvironment flushAndWait];
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
-(void)readWithBlock:(void (^)(SDSAnyReadTransaction *))block
|
||||
{
|
||||
[SDSDatabaseStorage.shared readWithBlock:block];
|
||||
}
|
||||
|
||||
-(void)writeWithBlock:(void (^)(SDSAnyWriteTransaction *))block
|
||||
{
|
||||
DatabaseStorageWrite(SDSDatabaseStorage.shared, block);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,41 +0,0 @@
|
||||
//
|
||||
// Copyright 2016 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
/////
|
||||
// Swift Test vs. CocoaPods issue #1
|
||||
/////
|
||||
//
|
||||
// CocoaPods-generated test targets (like this one)
|
||||
// fail to link if:
|
||||
//
|
||||
// * They only contain Obj-C tests.
|
||||
// * They depend on pods that use Swift.
|
||||
//
|
||||
// The work around is to add (this) empty swift file
|
||||
// to our test target.
|
||||
//
|
||||
// See: https://github.com/CocoaPods/CocoaPods/issues/7170
|
||||
|
||||
/////
|
||||
// Swift Test vs. CocoaPods issue #2
|
||||
/////
|
||||
//
|
||||
// XCode's test runner doesn't copy swift framework's required by dependencies into
|
||||
// the running test bundle.
|
||||
// It sounds similar to this issue: https://github.com/CocoaPods/CocoaPods/issues/7985
|
||||
//
|
||||
// The error output looks like this:
|
||||
// The bundle “SignalServiceKit-Unit-Tests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
|
||||
// [...]/SignalServiceKit-Unit-Tests.xctest/SignalServiceKit-Unit-Tests): Library not loaded: @rpath/libswiftAVFoundation.dylib
|
||||
// Referenced from: /Users/[...]/Build/Products/Debug-iphonesimulator/SignalServiceKit/SignalServiceKit.framework/SignalServiceKit
|
||||
// Reason: image not found)
|
||||
// Program ended with exit code: 82
|
||||
//
|
||||
// A work around is to redundantly import any swift frameworks used by the dependencies of the test suite into this test file.
|
||||
// The error message provides a hint, i.e. "Library not loaded: @rpath/libswiftAVFoundation.dylib" is fixed with `import AVFoundation`
|
||||
import AVFoundation
|
||||
import CloudKit
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
final class DatabaseRecoveryTest: SSKBaseTestSwift {
|
||||
final class DatabaseRecoveryTest: SSKBaseTest {
|
||||
// MARK: - Setup
|
||||
|
||||
private var keychainStorage: MockKeychainStorage!
|
||||
|
||||
@ -101,7 +101,7 @@ extension FooBarManager {
|
||||
}
|
||||
|
||||
// That works in production code, but when you try and test you run into some problems:
|
||||
private class FooBarManagerTest: SSKBaseTestSwift {
|
||||
private class FooBarManagerTest: SSKBaseTest {
|
||||
|
||||
var fooBarManager: FooBarManager!
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class InteractionFinderTest: SSKBaseTestSwift {
|
||||
class InteractionFinderTest: SSKBaseTest {
|
||||
func testInteractions() {
|
||||
let address1 = SignalServiceAddress(phoneNumber: "+fake-id")
|
||||
// Threads
|
||||
|
||||
@ -30,7 +30,7 @@ private class FakeAdapter: ModelCacheAdapter<OWSUserProfile.Address, OWSUserProf
|
||||
}
|
||||
}
|
||||
|
||||
class ModelReadCacheTest: SSKBaseTestSwift {
|
||||
class ModelReadCacheTest: SSKBaseTest {
|
||||
private lazy var adapter = { FakeAdapter(cacheName: "fake", cacheCountLimit: 1024, cacheCountLimitNSE: 1024) }()
|
||||
|
||||
override func setUp() {
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class OWSIdentityManagerTests: SSKBaseTestSwift {
|
||||
class OWSIdentityManagerTests: SSKBaseTest {
|
||||
private var identityManager: OWSIdentityManagerImpl { DependenciesBridge.shared.identityManager as! OWSIdentityManagerImpl }
|
||||
|
||||
override func setUp() {
|
||||
|
||||
@ -43,7 +43,7 @@ class MockObserver: DatabaseChangeDelegate {
|
||||
|
||||
// MARK: -
|
||||
|
||||
class SDSDatabaseStorageObservationTest: SSKBaseTestSwift {
|
||||
class SDSDatabaseStorageObservationTest: SSKBaseTest {
|
||||
func testGRDBSyncWrite() {
|
||||
// Make sure there's already at least one thread.
|
||||
let someThread = self.write { transaction in
|
||||
|
||||
@ -33,7 +33,7 @@ extension TSInteraction {
|
||||
|
||||
// MARK: -
|
||||
|
||||
class SDSDatabaseStorageTest: SSKBaseTestSwift {
|
||||
class SDSDatabaseStorageTest: SSKBaseTest {
|
||||
|
||||
// MARK: - Test Life Cycle
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class SDSKeyValueStoreTest: SSKBaseTestSwift {
|
||||
class SDSKeyValueStoreTest: SSKBaseTest {
|
||||
|
||||
func test_bool() {
|
||||
let store = SDSKeyValueStore(collection: "test")
|
||||
|
||||
@ -22,7 +22,7 @@ extension SSKPreKeyStore {
|
||||
}
|
||||
}
|
||||
|
||||
class SSKPreKeyStoreTests: SSKBaseTestSwift {
|
||||
class SSKPreKeyStoreTests: SSKBaseTest {
|
||||
|
||||
private var aciPreKeyStore: SSKPreKeyStore!
|
||||
private var pniPreKeyStore: SSKPreKeyStore!
|
||||
|
||||
@ -15,7 +15,7 @@ private extension SSKSignedPreKeyStore {
|
||||
}
|
||||
}
|
||||
|
||||
class SSKSignedPreKeyStoreTest: SSKBaseTestSwift {
|
||||
class SSKSignedPreKeyStoreTest: SSKBaseTest {
|
||||
func testPniStoreIsSeparate() {
|
||||
let aciStore = SSKSignedPreKeyStore(for: .aci)
|
||||
let pniStore = SSKSignedPreKeyStore(for: .pni)
|
||||
|
||||
@ -7,7 +7,7 @@ import Foundation
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class TestModelTests: SSKBaseTestSwift {
|
||||
class TestModelTests: SSKBaseTest {
|
||||
|
||||
func testTestModel() {
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class StoryManagerTest: SSKBaseTestSwift {
|
||||
class StoryManagerTest: SSKBaseTest {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class SystemStoryManagerTest: SSKBaseTestSwift {
|
||||
class SystemStoryManagerTest: SSKBaseTest {
|
||||
|
||||
let timeout: TimeInterval = 5
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import <SignalServiceKit/FunctionalUtil.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface FunctionalUtilTest : XCTestCase
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class LRUCacheTest: SSKBaseTestSwift {
|
||||
class LRUCacheTest: SSKBaseTest {
|
||||
func testStringString() {
|
||||
let cache = LRUCache<String, String>(maxSize: 16)
|
||||
let key1 = "a"
|
||||
|
||||
170
SignalServiceKit/tests/Util/TSMessageStorageTest.swift
Normal file
170
SignalServiceKit/tests/Util/TSMessageStorageTest.swift
Normal file
@ -0,0 +1,170 @@
|
||||
//
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
import LibSignalClient
|
||||
import XCTest
|
||||
|
||||
final class TSMessageStorageTest: SSKBaseTest {
|
||||
private var thread: TSContactThread!
|
||||
|
||||
var localAci: Aci { return Aci.parseFrom(aciString: "00000000-0000-4000-8000-000000000000")! }
|
||||
var localAddress: SignalServiceAddress { return SignalServiceAddress(localAci) }
|
||||
|
||||
var otherAci: Aci { return Aci.parseFrom(aciString: "00000000-0000-4000-8000-000000000001")! }
|
||||
var otherAddress: SignalServiceAddress { return SignalServiceAddress(otherAci) }
|
||||
|
||||
private func numberOfInteractions(thread: TSThread, tx: SDSAnyReadTransaction) -> UInt {
|
||||
var count: UInt = 0
|
||||
try! InteractionFinder(threadUniqueId: thread.uniqueId)
|
||||
.enumerateInteractionIds(transaction: tx) { _, _ in
|
||||
count += 1
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
write { tx in
|
||||
(DependenciesBridge.shared.registrationStateChangeManager as! RegistrationStateChangeManagerImpl).registerForTests(
|
||||
localIdentifiers: .forUnitTests,
|
||||
tx: tx.asV2Write
|
||||
)
|
||||
|
||||
self.thread = TSContactThread.getOrCreateThread(
|
||||
withContactAddress: self.otherAddress,
|
||||
transaction: tx
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
func testStoreIncomingMessage() {
|
||||
write { tx in
|
||||
let timestamp: UInt64 = 42
|
||||
let body = "So long, and thanks for all the fish!"
|
||||
|
||||
let newMessage: TSIncomingMessage = TSIncomingMessageBuilder
|
||||
.withDefaults(
|
||||
thread: thread,
|
||||
timestamp: timestamp,
|
||||
authorAci: otherAci,
|
||||
messageBody: body
|
||||
).build()
|
||||
newMessage.anyInsert(transaction: tx)
|
||||
|
||||
guard let fetchedMessage = TSIncomingMessage.anyFetchIncomingMessage(
|
||||
uniqueId: newMessage.uniqueId,
|
||||
transaction: tx
|
||||
) else {
|
||||
XCTFail("Failed to find inserted message!")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(body, fetchedMessage.body)
|
||||
XCTAssertEqual(timestamp, fetchedMessage.timestamp)
|
||||
XCTAssertFalse(fetchedMessage.wasRead)
|
||||
XCTAssertEqual(thread.uniqueId, fetchedMessage.uniqueThreadId)
|
||||
}
|
||||
}
|
||||
|
||||
func testMessagesDeletedOnThreadDeletion() {
|
||||
write { tx -> Void in
|
||||
let body = "So long, and thanks for all the fish!"
|
||||
|
||||
let messages = (0..<10).map { idx -> TSIncomingMessage in
|
||||
let newMessage: TSIncomingMessage = TSIncomingMessageBuilder
|
||||
.withDefaults(
|
||||
thread: thread,
|
||||
timestamp: UInt64(idx) + 1,
|
||||
authorAci: otherAci,
|
||||
messageBody: body
|
||||
).build()
|
||||
newMessage.anyInsert(transaction: tx)
|
||||
return newMessage
|
||||
}
|
||||
|
||||
for (idx, message) in messages.enumerated() {
|
||||
guard let fetchedMessage = TSIncomingMessage.anyFetchIncomingMessage(
|
||||
uniqueId: message.uniqueId,
|
||||
transaction: tx
|
||||
) else {
|
||||
XCTFail("Failed to find inserted message!")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(body, fetchedMessage.body)
|
||||
XCTAssertEqual(message.uniqueId, fetchedMessage.uniqueId)
|
||||
XCTAssertEqual(UInt64(idx + 1), fetchedMessage.timestamp)
|
||||
XCTAssertFalse(fetchedMessage.wasRead)
|
||||
XCTAssertEqual(thread.uniqueId, fetchedMessage.uniqueThreadId)
|
||||
}
|
||||
|
||||
thread.softDelete(with: tx)
|
||||
|
||||
for message in messages {
|
||||
XCTAssertNil(TSIncomingMessage.anyFetchIncomingMessage(
|
||||
uniqueId: message.uniqueId,
|
||||
transaction: tx
|
||||
))
|
||||
}
|
||||
|
||||
XCTAssertEqual(0, numberOfInteractions(thread: thread, tx: tx))
|
||||
}
|
||||
}
|
||||
|
||||
func testGroupMessagesDeletedOnThreadDeletion() {
|
||||
write { tx in
|
||||
let body = "So long, and thanks for all the fish!"
|
||||
|
||||
let groupThread = try! GroupManager.createGroupForTests(members: [
|
||||
localAddress,
|
||||
otherAddress
|
||||
], transaction: tx)
|
||||
|
||||
let messages = (0..<10).map { idx -> TSIncomingMessage in
|
||||
let authorIdx = idx % groupThread.groupModel.groupMembers.count
|
||||
let authorAddress = groupThread.groupModel.groupMembers[authorIdx]
|
||||
let newMessage: TSIncomingMessage = TSIncomingMessageBuilder
|
||||
.withDefaults(
|
||||
thread: groupThread,
|
||||
timestamp: UInt64(idx + 1),
|
||||
authorAci: authorAddress.aci!,
|
||||
messageBody: body
|
||||
).build()
|
||||
newMessage.anyInsert(transaction: tx)
|
||||
return newMessage
|
||||
}
|
||||
|
||||
for (idx, message) in messages.enumerated() {
|
||||
guard let fetchedMessage = TSIncomingMessage.anyFetchIncomingMessage(
|
||||
uniqueId: message.uniqueId,
|
||||
transaction: tx
|
||||
) else {
|
||||
XCTFail("Failed to find inserted message!")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(body, fetchedMessage.body)
|
||||
XCTAssertEqual(message.uniqueId, fetchedMessage.uniqueId)
|
||||
XCTAssertEqual(UInt64(idx + 1), fetchedMessage.timestamp)
|
||||
XCTAssertFalse(fetchedMessage.wasRead)
|
||||
XCTAssertEqual(groupThread.uniqueId, fetchedMessage.uniqueThreadId)
|
||||
}
|
||||
|
||||
groupThread.softDelete(with: tx)
|
||||
|
||||
for message in messages {
|
||||
XCTAssertNil(TSIncomingMessage.anyFetchIncomingMessage(
|
||||
uniqueId: message.uniqueId,
|
||||
transaction: tx
|
||||
))
|
||||
}
|
||||
|
||||
XCTAssertEqual(0, numberOfInteractions(thread: groupThread, tx: tx))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,180 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
#import "SSKBaseTestObjC.h"
|
||||
#import "TSContactThread.h"
|
||||
#import "TSGroupThread.h"
|
||||
#import "TSIncomingMessage.h"
|
||||
#import "TSMessage.h"
|
||||
#import "TSOutgoingMessage.h"
|
||||
#import "TSThread.h"
|
||||
#import <SignalCoreKit/Cryptography.h>
|
||||
#import <SignalServiceKit/SignalServiceKit-Swift.h>
|
||||
|
||||
@interface TSMessageStorageTests : SSKBaseTestObjC
|
||||
|
||||
@property TSContactThread *thread;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@implementation TSMessageStorageTests
|
||||
|
||||
- (AciObjC *)localAci
|
||||
{
|
||||
return [[AciObjC alloc] initWithAciString:@"00000000-0000-4000-8000-000000000000"];
|
||||
}
|
||||
|
||||
- (SignalServiceAddress *)localAddress
|
||||
{
|
||||
return [[SignalServiceAddress alloc] initWithServiceIdObjC:[self localAci]];
|
||||
}
|
||||
|
||||
- (AciObjC *)otherAci
|
||||
{
|
||||
return [[AciObjC alloc] initWithAciString:@"00000000-0000-4000-8000-000000000001"];
|
||||
}
|
||||
|
||||
- (SignalServiceAddress *)otherAddress
|
||||
{
|
||||
return [[SignalServiceAddress alloc] initWithServiceIdObjC:[self otherAci]];
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
|
||||
[RegistrationStateChangeManagerObjcTestUtil registerForTests];
|
||||
|
||||
[self writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
self.thread = [TSContactThread getOrCreateThreadWithContactAddress:self.otherAddress transaction:transaction];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testStoreIncomingMessage
|
||||
{
|
||||
__block NSString *messageId;
|
||||
uint64_t timestamp = 666;
|
||||
|
||||
NSString *body
|
||||
= @"A child born today will grow up with no conception of privacy at all. They’ll never know what it means to "
|
||||
@"have a private moment to themselves an unrecorded, unanalyzed thought. And that’s a problem because "
|
||||
@"privacy matters; privacy is what allows us to determine who we are and who we want to be.";
|
||||
|
||||
[self writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
TSIncomingMessageBuilder *incomingMessageBuilder =
|
||||
[TSIncomingMessageBuilder withDefaultsObjcWithThread:self.thread
|
||||
messageBody:body
|
||||
timestamp:timestamp
|
||||
authorAci:[self otherAci]];
|
||||
TSIncomingMessage *newMessage = [incomingMessageBuilder build];
|
||||
|
||||
[newMessage anyInsertWithTransaction:transaction];
|
||||
messageId = newMessage.uniqueId;
|
||||
|
||||
TSIncomingMessage *_Nullable fetchedMessage =
|
||||
[TSIncomingMessage anyFetchIncomingMessageWithUniqueId:messageId transaction:transaction];
|
||||
|
||||
XCTAssertEqualObjects(body, fetchedMessage.body);
|
||||
XCTAssertEqual(timestamp, fetchedMessage.timestamp);
|
||||
XCTAssertFalse(fetchedMessage.wasRead);
|
||||
XCTAssertEqualObjects(self.thread.uniqueId, fetchedMessage.uniqueThreadId);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testMessagesDeletedOnThreadDeletion
|
||||
{
|
||||
NSString *body
|
||||
= @"A child born today will grow up with no conception of privacy at all. They’ll never know what it means to "
|
||||
@"have a private moment to themselves an unrecorded, unanalyzed thought. And that’s a problem because "
|
||||
@"privacy matters; privacy is what allows us to determine who we are and who we want to be.";
|
||||
|
||||
[self writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
NSMutableArray<TSIncomingMessage *> *messages = [NSMutableArray new];
|
||||
for (uint64_t i = 0; i < 10; i++) {
|
||||
TSIncomingMessageBuilder *incomingMessageBuilder =
|
||||
[TSIncomingMessageBuilder withDefaultsObjcWithThread:self.thread
|
||||
messageBody:body
|
||||
timestamp:(i + 1)
|
||||
authorAci:[self otherAci]];
|
||||
TSIncomingMessage *newMessage = [incomingMessageBuilder build];
|
||||
|
||||
[messages addObject:newMessage];
|
||||
[newMessage anyInsertWithTransaction:transaction];
|
||||
}
|
||||
|
||||
for (TSIncomingMessage *message in messages) {
|
||||
TSIncomingMessage *_Nullable fetchedMessage =
|
||||
[TSIncomingMessage anyFetchIncomingMessageWithUniqueId:message.uniqueId transaction:transaction];
|
||||
|
||||
XCTAssertEqualObjects(fetchedMessage.body, body, @"Body of incoming message recovered");
|
||||
XCTAssertEqualObjects(fetchedMessage.uniqueId, message.uniqueId, @"Unique identifier is accurate");
|
||||
XCTAssertFalse(fetchedMessage.wasRead, @"Message should originally be unread");
|
||||
XCTAssertEqualObjects(
|
||||
fetchedMessage.uniqueThreadId, self.thread.uniqueId, @"Isn't stored in the right thread!");
|
||||
}
|
||||
|
||||
[self.thread softDeleteThreadWithTransaction:transaction];
|
||||
|
||||
for (TSIncomingMessage *message in messages) {
|
||||
TSIncomingMessage *_Nullable fetchedMessage =
|
||||
[TSIncomingMessage anyFetchIncomingMessageWithUniqueId:message.uniqueId transaction:transaction];
|
||||
XCTAssertNil(fetchedMessage, @"Message should be deleted!");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)testGroupMessagesDeletedOnThreadDeletion
|
||||
{
|
||||
NSString *body
|
||||
= @"A child born today will grow up with no conception of privacy at all. They’ll never know what it means to "
|
||||
@"have a private moment to themselves an unrecorded, unanalyzed thought. And that’s a problem because "
|
||||
@"privacy matters; privacy is what allows us to determine who we are and who we want to be.";
|
||||
|
||||
[self writeWithBlock:^(SDSAnyWriteTransaction *transaction) {
|
||||
TSGroupThread *thread = [GroupManager createGroupForTestsObjcWithMembers:@[
|
||||
self.localAddress,
|
||||
self.otherAddress,
|
||||
]
|
||||
name:@"fdsfsd"
|
||||
avatarData:nil
|
||||
transaction:transaction];
|
||||
|
||||
NSMutableArray<TSIncomingMessage *> *messages = [NSMutableArray new];
|
||||
for (uint64_t i = 0; i < 10; i++) {
|
||||
NSUInteger memberIdx = (i % thread.groupModel.groupMembers.count);
|
||||
SignalServiceAddress *authorAddress = thread.groupModel.groupMembers[memberIdx];
|
||||
TSIncomingMessageBuilder *incomingMessageBuilder =
|
||||
[TSIncomingMessageBuilder withDefaultsObjcWithThread:thread
|
||||
messageBody:body
|
||||
timestamp:(i + 1)
|
||||
authorAci:(AciObjC *)authorAddress.serviceIdObjC];
|
||||
TSIncomingMessage *newMessage = [incomingMessageBuilder build];
|
||||
[newMessage anyInsertWithTransaction:transaction];
|
||||
[messages addObject:newMessage];
|
||||
}
|
||||
|
||||
for (TSIncomingMessage *message in messages) {
|
||||
TSIncomingMessage *_Nullable fetchedMessage =
|
||||
[TSIncomingMessage anyFetchIncomingMessageWithUniqueId:message.uniqueId transaction:transaction];
|
||||
XCTAssertNotNil(fetchedMessage);
|
||||
XCTAssertEqualObjects(fetchedMessage.body, body, @"Body of incoming message recovered");
|
||||
XCTAssertEqualObjects(fetchedMessage.uniqueId, message.uniqueId, @"Unique identifier is accurate");
|
||||
XCTAssertFalse(fetchedMessage.wasRead, @"Message should originally be unread");
|
||||
XCTAssertEqualObjects(fetchedMessage.uniqueThreadId, thread.uniqueId, @"Isn't stored in the right thread!");
|
||||
}
|
||||
|
||||
[thread softDeleteThreadWithTransaction:transaction];
|
||||
|
||||
for (TSIncomingMessage *message in messages) {
|
||||
TSIncomingMessage *_Nullable fetchedMessage =
|
||||
[TSIncomingMessage anyFetchIncomingMessageWithUniqueId:message.uniqueId transaction:transaction];
|
||||
XCTAssertNil(fetchedMessage, @"Message should be deleted!");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -8,7 +8,7 @@ import XCTest
|
||||
|
||||
@testable import SignalServiceKit
|
||||
|
||||
class ViewOnceMessagesTest: SSKBaseTestSwift {
|
||||
class ViewOnceMessagesTest: SSKBaseTest {
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
//
|
||||
// Copyright 2018 Signal Messenger, LLC
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import SignalCoreKit
|
||||
|
||||
import XCTest
|
||||
@testable import SignalServiceKit
|
||||
import CocoaLumberjack
|
||||
|
||||
extension Thenable {
|
||||
func expect(timeout: TimeInterval, file: StaticString = #file, line: UInt = #line) -> Value {
|
||||
@ -22,44 +22,6 @@ extension Thenable {
|
||||
}
|
||||
}
|
||||
|
||||
@objc
|
||||
public class SSKBaseTestSwift: XCTestCase {
|
||||
@objc
|
||||
public override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
DDLog.add(DDTTYLogger.sharedInstance!)
|
||||
|
||||
SetCurrentAppContext(TestAppContext(), true)
|
||||
|
||||
MockSSKEnvironment.activate()
|
||||
}
|
||||
|
||||
@objc
|
||||
public override func tearDown() {
|
||||
MockSSKEnvironment.flushAndWait()
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
@objc
|
||||
public func read(_ block: (SDSAnyReadTransaction) -> Void) {
|
||||
return databaseStorage.read(block: block)
|
||||
}
|
||||
|
||||
public func write<T>(_ block: (SDSAnyWriteTransaction) -> T) -> T {
|
||||
return databaseStorage.write(block: block)
|
||||
}
|
||||
|
||||
public func write<T>(_ block: (SDSAnyWriteTransaction) throws -> T) throws -> T {
|
||||
try databaseStorage.write(block: block)
|
||||
}
|
||||
|
||||
@objc
|
||||
public func asyncWrite(_ block: @escaping (SDSAnyWriteTransaction) -> Void) {
|
||||
return databaseStorage.asyncWrite(block: block)
|
||||
}
|
||||
}
|
||||
|
||||
extension XCTestCase {
|
||||
@discardableResult
|
||||
public func expect<T>(
|
||||
Loading…
Reference in New Issue
Block a user