Browse Source

IOSAD-191 Add PEPObjCAdapterTypesTests_macOS test target. Add conforms and support PEPIdentity tests.

IOSAD-191
David Alarcon 2 years ago
parent
commit
7cef42d24f
4 changed files with 246 additions and 0 deletions
  1. +22
    -0
      PEPObjCAdapterTypesTests_macOS/Info.plist
  2. +38
    -0
      PEPObjCAdapterTypesTests_macOS/PEPIdentityTests.m
  3. +37
    -0
      PEPObjCAdapterTypesTests_macOS/PEPObjCAdapterTypesTests_macOS.m
  4. +149
    -0
      pEpObjCAdapter.xcodeproj/project.pbxproj

+ 22
- 0
PEPObjCAdapterTypesTests_macOS/Info.plist View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

+ 38
- 0
PEPObjCAdapterTypesTests_macOS/PEPIdentityTests.m View File

@ -0,0 +1,38 @@
//
// PEPIdentityTests.m
// PEPObjCAdapterTypesTests_macOS
//
// Created by David Alarcon on 26/1/21.
// Copyright © 2021 pp. All rights reserved.
//
#import <XCTest/XCTest.h>
#import "PEPIdentity+SecureCoding.h"
@interface PEPIdentityTests : XCTestCase
@property (nonatomic, strong) PEPIdentity *identity;
@end
@implementation PEPIdentityTests
- (void)setUp {
[super setUp];
self.identity = [[PEPIdentity alloc] initWithAddress:@"test@host.com"];
}
- (void)tearDown {
[super tearDown];
}
- (void)testConformsSecureCodingProtocol {
XCTAssertTrue([self.identity conformsToProtocol:@protocol(NSSecureCoding)]);
}
- (void)testSupportsSecureCodingProtocol {
XCTAssertTrue([PEPIdentity supportsSecureCoding]);
}
@end

+ 37
- 0
PEPObjCAdapterTypesTests_macOS/PEPObjCAdapterTypesTests_macOS.m View File

@ -0,0 +1,37 @@
//
// PEPObjCAdapterTypesTests_macOS.m
// PEPObjCAdapterTypesTests_macOS
//
// Created by David Alarcon on 26/1/21.
// Copyright © 2021 pp. All rights reserved.
//
#import <XCTest/XCTest.h>
@interface PEPObjCAdapterTypesTests_macOS : XCTestCase
@end
@implementation PEPObjCAdapterTypesTests_macOS
- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end

+ 149
- 0
pEpObjCAdapter.xcodeproj/project.pbxproj View File

@ -194,6 +194,10 @@
4EDB863525C062F400FA045D /* PEPLanguage+SecureCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EA9B56425BF277F0048427E /* PEPLanguage+SecureCoding.h */; };
4EDB863625C062F600FA045D /* PEPAttachment+SecureCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EA9B5A525BF2A9A0048427E /* PEPAttachment+SecureCoding.h */; };
4EDB863C25C062F800FA045D /* PEPMessage+SecureCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E58698125BF2FA900779EAD /* PEPMessage+SecureCoding.h */; };
4EDB86ED25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EDB86EC25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.m */; };
4EDB86EF25C0674900FA045D /* libPEPObjCAdapterTypes_macOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 150E8FB225755B6900AE2198 /* libPEPObjCAdapterTypes_macOS.a */; };
4EDB86FE25C067DC00FA045D /* PEPIdentityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EDB86FD25C067DC00FA045D /* PEPIdentityTests.m */; };
4EDB871125C06A7B00FA045D /* PEPMessage+SecureCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E58698225BF2FA900779EAD /* PEPMessage+SecureCoding.m */; };
640F79231C9B517C00DBEC4E /* 5CB2C182_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 640F79211C9B517C00DBEC4E /* 5CB2C182_sec.asc */; };
640F79241C9B517C00DBEC4E /* 5CB2C182.asc in Resources */ = {isa = PBXBuildFile; fileRef = 640F79221C9B517C00DBEC4E /* 5CB2C182.asc */; };
64415E2F1BE9511C00F6CBB2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35FB0ABD1B57F99D00377032 /* Security.framework */; platformFilter = ios; };
@ -215,6 +219,13 @@
remoteGlobalIDString = 1552DB112577D4F100A92F71;
remoteInfo = pEpEngine_macOS;
};
4EDB86F025C0674900FA045D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 352988A21AEF964100FA7E2E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 150E8FB125755B6900AE2198;
remoteInfo = PEPObjCAdapterTypes_macOS;
};
64289E551B8B70E800FC617B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 64DA243B1B833248000BEE80 /* pEpEngine.xcodeproj */;
@ -401,6 +412,10 @@
4EA9B56525BF277F0048427E /* PEPLanguage+SecureCoding.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PEPLanguage+SecureCoding.m"; sourceTree = "<group>"; };
4EA9B5A525BF2A9A0048427E /* PEPAttachment+SecureCoding.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PEPAttachment+SecureCoding.h"; sourceTree = "<group>"; };
4EA9B5A625BF2A9A0048427E /* PEPAttachment+SecureCoding.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "PEPAttachment+SecureCoding.m"; sourceTree = "<group>"; };
4EDB86EA25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PEPObjCAdapterTypesTests_macOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4EDB86EC25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPObjCAdapterTypesTests_macOS.m; sourceTree = "<group>"; };
4EDB86EE25C0674900FA045D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4EDB86FD25C067DC00FA045D /* PEPIdentityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPIdentityTests.m; sourceTree = "<group>"; };
640F79211C9B517C00DBEC4E /* 5CB2C182_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 5CB2C182_sec.asc; sourceTree = "<group>"; };
640F79221C9B517C00DBEC4E /* 5CB2C182.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 5CB2C182.asc; sourceTree = "<group>"; };
64415E171BE94FCB00F6CBB2 /* pEpObjCAdapterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = pEpObjCAdapterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@ -450,6 +465,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
4EDB86E725C0674900FA045D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4EDB86EF25C0674900FA045D /* libPEPObjCAdapterTypes_macOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
64415E141BE94FCB00F6CBB2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -622,6 +645,7 @@
1552D93C2576602D00A92F71 /* PEPObjCAdapter_macOS */,
1543DC67257943CE0041EFB5 /* PEPObjCAdapter_iOS */,
151606FE257A401000DD42E0 /* PEPObjCAdapterTypes_iOS */,
4EDB86EB25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS */,
352988AB1AEF964100FA7E2E /* Products */,
43447C51221D448500B6323E /* Frameworks */,
);
@ -635,6 +659,7 @@
1552D93B2576602D00A92F71 /* libPEPObjCAdapter_macOS.a */,
1543DC66257943CE0041EFB5 /* libPEPObjCAdapter_iOS.a */,
151606FD257A401000DD42E0 /* libPEPObjCAdapterTypes_iOS.a */,
4EDB86EA25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -721,6 +746,16 @@
path = Extensions;
sourceTree = "<group>";
};
4EDB86EB25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS */ = {
isa = PBXGroup;
children = (
4EDB86EC25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.m */,
4EDB86EE25C0674900FA045D /* Info.plist */,
4EDB86FD25C067DC00FA045D /* PEPIdentityTests.m */,
);
path = PEPObjCAdapterTypesTests_macOS;
sourceTree = "<group>";
};
64289E521B8B70E800FC617B /* Products */ = {
isa = PBXGroup;
children = (
@ -933,6 +968,24 @@
productReference = 1552D93B2576602D00A92F71 /* libPEPObjCAdapter_macOS.a */;
productType = "com.apple.product-type.library.static";
};
4EDB86E925C0674900FA045D /* PEPObjCAdapterTypesTests_macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4EDB86F625C0674900FA045D /* Build configuration list for PBXNativeTarget "PEPObjCAdapterTypesTests_macOS" */;
buildPhases = (
4EDB86E625C0674900FA045D /* Sources */,
4EDB86E725C0674900FA045D /* Frameworks */,
4EDB86E825C0674900FA045D /* Resources */,
);
buildRules = (
);
dependencies = (
4EDB86F125C0674900FA045D /* PBXTargetDependency */,
);
name = PEPObjCAdapterTypesTests_macOS;
productName = PEPObjCAdapterTypesTests_macOS;
productReference = 4EDB86EA25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
64415E161BE94FCB00F6CBB2 /* pEpObjCAdapterTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 64415E281BE94FCB00F6CBB2 /* Build configuration list for PBXNativeTarget "pEpObjCAdapterTests" */;
@ -973,6 +1026,9 @@
1552D93A2576602D00A92F71 = {
CreatedOnToolsVersion = 12.2;
};
4EDB86E925C0674900FA045D = {
CreatedOnToolsVersion = 12.3;
};
64415E161BE94FCB00F6CBB2 = {
CreatedOnToolsVersion = 7.1;
DevelopmentTeam = NQLYU6MGPN;
@ -1003,6 +1059,7 @@
64415E161BE94FCB00F6CBB2 /* pEpObjCAdapterTests */,
150E8FB125755B6900AE2198 /* PEPObjCAdapterTypes_macOS */,
151606FC257A401000DD42E0 /* PEPObjCAdapterTypes_iOS */,
4EDB86E925C0674900FA045D /* PEPObjCAdapterTypesTests_macOS */,
);
};
/* End PBXProject section */
@ -1032,6 +1089,13 @@
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
4EDB86E825C0674900FA045D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
64415E151BE94FCB00F6CBB2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -1201,6 +1265,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
4EDB86E625C0674900FA045D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4EDB86ED25C0674900FA045D /* PEPObjCAdapterTypesTests_macOS.m in Sources */,
4EDB871125C06A7B00FA045D /* PEPMessage+SecureCoding.m in Sources */,
4EDB86FE25C067DC00FA045D /* PEPIdentityTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
64415E131BE94FCB00F6CBB2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -1223,6 +1297,11 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
4EDB86F125C0674900FA045D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 150E8FB125755B6900AE2198 /* PEPObjCAdapterTypes_macOS */;
targetProxy = 4EDB86F025C0674900FA045D /* PBXContainerItemProxy */;
};
64415E401BE95B2000F6CBB2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = pEpTrustWords;
@ -1543,6 +1622,67 @@
};
name = Release;
};
4EDB86F225C0674900FA045D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NQLYU6MGPN;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
INFOPLIST_FILE = PEPObjCAdapterTypesTests_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "pep.foundation.PEPObjCAdapterTypesTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
name = Debug;
};
4EDB86F325C0674900FA045D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = NQLYU6MGPN;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = PEPObjCAdapterTypesTests_macOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "pep.foundation.PEPObjCAdapterTypesTests-macOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
name = Release;
};
64415E1F1BE94FCB00F6CBB2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -1661,6 +1801,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4EDB86F625C0674900FA045D /* Build configuration list for PBXNativeTarget "PEPObjCAdapterTypesTests_macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4EDB86F225C0674900FA045D /* Debug */,
4EDB86F325C0674900FA045D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
64415E281BE94FCB00F6CBB2 /* Build configuration list for PBXNativeTarget "pEpObjCAdapterTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (


Loading…
Cancel
Save