Add CogTests.

These can later be used for integration tests.
This commit is contained in:
Jan Weiß 2021-05-05 13:51:56 +02:00
parent 8c60aca700
commit e06561bc19
4 changed files with 222 additions and 0 deletions

View file

@ -91,6 +91,7 @@
17F6C8070F603701000D9DA9 /* PlaybackEventController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C8060F603701000D9DA9 /* PlaybackEventController.m */; };
17FAEBAC0F662985007C8707 /* ToolTipTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FAEBAB0F662985007C8707 /* ToolTipTextField.m */; };
3D42D1302641739C002A170C /* MonospacedDigitTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D42D12F2641739C002A170C /* MonospacedDigitTextFieldCell.m */; };
3D42D1B82642BB62002A170C /* CogTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D42D1B72642BB62002A170C /* CogTests.m */; };
5604D45B0D60349B004F5C5D /* SpotlightWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5604D4590D60349B004F5C5D /* SpotlightWindowController.m */; };
5604D4F60D60726E004F5C5D /* SpotlightPlaylistEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 5604D4F50D60726E004F5C5D /* SpotlightPlaylistEntry.m */; };
56462EAF0D6341F6000AB68C /* SpotlightTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 56462EAE0D6341F6000AB68C /* SpotlightTransformers.m */; };
@ -302,6 +303,13 @@
remoteGlobalIDString = 8D5B49AC048680CD000E48DA;
remoteInfo = Preferences;
};
3D42D1BA2642BB62002A170C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8D1107260486CEB800E47090;
remoteInfo = Cog;
};
566D321A0D538550004466A5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 566D32160D538550004466A5 /* APL.xcodeproj */;
@ -812,6 +820,9 @@
32CA4F630368D1EE00C91783 /* Cog_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cog_Prefix.pch; sourceTree = "<group>"; };
3D42D12E2641739C002A170C /* MonospacedDigitTextFieldCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonospacedDigitTextFieldCell.h; sourceTree = "<group>"; };
3D42D12F2641739C002A170C /* MonospacedDigitTextFieldCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonospacedDigitTextFieldCell.m; sourceTree = "<group>"; };
3D42D1B52642BB62002A170C /* CogTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CogTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3D42D1B72642BB62002A170C /* CogTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CogTests.m; sourceTree = "<group>"; };
3D42D1B92642BB62002A170C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3DDFC2462344EC6B000F1453 /* DEVELOPMENT_TEAM.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DEVELOPMENT_TEAM.xcconfig; sourceTree = "<group>"; };
3DDFC2472344EC6B000F1453 /* Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
5604D4590D60349B004F5C5D /* SpotlightWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SpotlightWindowController.m; path = Spotlight/SpotlightWindowController.m; sourceTree = "<group>"; };
@ -938,6 +949,13 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
3D42D1B22642BB62002A170C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -1328,6 +1346,7 @@
isa = PBXGroup;
children = (
1770424E0B8BC41800B86321 /* Cog.app */,
3D42D1B52642BB62002A170C /* CogTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -1340,6 +1359,7 @@
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
3D42D1B62642BB62002A170C /* CogTests */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
17B619FF0B909ED400BC003F /* PlugIns */,
3DDFC2452344EC6A000F1453 /* Xcode-config */,
@ -1392,6 +1412,15 @@
name = Frameworks;
sourceTree = "<group>";
};
3D42D1B62642BB62002A170C /* CogTests */ = {
isa = PBXGroup;
children = (
3D42D1B72642BB62002A170C /* CogTests.m */,
3D42D1B92642BB62002A170C /* Info.plist */,
);
path = CogTests;
sourceTree = "<group>";
};
3DDFC2452344EC6A000F1453 /* Xcode-config */ = {
isa = PBXGroup;
children = (
@ -1680,6 +1709,24 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
3D42D1B42642BB62002A170C /* CogTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3D42D1C02642BB62002A170C /* Build configuration list for PBXNativeTarget "CogTests" */;
buildPhases = (
3D42D1B12642BB62002A170C /* Sources */,
3D42D1B22642BB62002A170C /* Frameworks */,
3D42D1B32642BB62002A170C /* Resources */,
);
buildRules = (
);
dependencies = (
3D42D1BB2642BB62002A170C /* PBXTargetDependency */,
);
name = CogTests;
productName = CogTests;
productReference = 3D42D1B52642BB62002A170C /* CogTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
8D1107260486CEB800E47090 /* Cog */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Cog" */;
@ -1739,6 +1786,12 @@
attributes = {
LastUpgradeCheck = 1250;
TargetAttributes = {
3D42D1B42642BB62002A170C = {
CreatedOnToolsVersion = 12.4;
DevelopmentTeam = "";
ProvisioningStyle = Automatic;
TestTargetID = 8D1107260486CEB800E47090;
};
8D1107260486CEB800E47090 = {
DevelopmentTeam = "";
LastSwiftMigration = 1220;
@ -1885,6 +1938,7 @@
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* Cog */,
3D42D1B42642BB62002A170C /* CogTests */,
);
};
/* End PBXProject section */
@ -2110,6 +2164,13 @@
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
3D42D1B32642BB62002A170C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -2197,6 +2258,14 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
3D42D1B12642BB62002A170C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3D42D1B82642BB62002A170C /* CogTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -2324,6 +2393,11 @@
name = Preferences;
targetProxy = 17F5623A0C3BD9280019975C /* PBXContainerItemProxy */;
};
3D42D1BB2642BB62002A170C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 8D1107260486CEB800E47090 /* Cog */;
targetProxy = 3D42D1BA2642BB62002A170C /* PBXContainerItemProxy */;
};
834D793020E4EFCC00C4A5CC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "VorbisPlugin Plugin";
@ -2517,6 +2591,77 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
3D42D1BC2642BB62002A170C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = CogTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.CogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Cog.app/Contents/MacOS/Cog";
};
name = Debug;
};
3D42D1BD2642BB62002A170C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = CogTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.CogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Cog.app/Contents/MacOS/Cog";
};
name = Release;
};
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -2692,6 +2837,15 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
3D42D1C02642BB62002A170C /* Build configuration list for PBXNativeTarget "CogTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3D42D1BC2642BB62002A170C /* Debug */,
3D42D1BD2642BB62002A170C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Cog" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View file

@ -37,6 +37,16 @@
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3D42D1B42642BB62002A170C"
BuildableName = "CogTests.xctest"
BlueprintName = "CogTests"
ReferencedContainer = "container:Cog.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction

36
CogTests/CogTests.m Normal file
View file

@ -0,0 +1,36 @@
//
// CogTests.m
// CogTests
//
// Created by Jan on 05.05.21.
//
#import <XCTest/XCTest.h>
@interface CogTests : XCTestCase
@end
@implementation CogTests
- (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

22
CogTests/Info.plist Normal file
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>