Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Commit

Permalink
#10 migrate to XCTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Tae Won Ha committed Sep 29, 2013
1 parent bd555aa commit e6a496d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 33 deletions.
38 changes: 10 additions & 28 deletions Qmind.xcodeproj/project.pbxproj
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
1929B057FE485599D1E5D1C6 /* QMCellPropertiesManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B918241E1ACDCDC89AA2 /* QMCellPropertiesManagerTest.m */; };
1929B059162A10744EF02985 /* QMIconsPaneView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B2FCB4A407CCC68D9D45 /* QMIconsPaneView.m */; };
1929B0840D140F224C35878C /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1929BF92908230239CB415EA /* XCTest.framework */; };
1929B0EDA68642C93FA1B352 /* QMLookUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B3AAAFA6CF293F45F812 /* QMLookUtil.m */; };
1929B194FE5529B11EAFE7DA /* QMCellSizeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B353C299640D7D91AA9D /* QMCellSizeManager.m */; };
1929B24EA8328150C669DA66 /* QMCellSizeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B353C299640D7D91AA9D /* QMCellSizeManager.m */; };
Expand Down Expand Up @@ -159,7 +160,6 @@
4BB460071736A03F00B2B15D /* QMMindmapReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF0D /* QMMindmapReader.m */; };
4BB460081736A03F00B2B15D /* QMMindmapViewDataSourceImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A008509A6 /* QMMindmapViewDataSourceImpl.m */; };
4BB460091736A03F00B2B15D /* QMDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF22 /* QMDocumentWindowController.m */; };
4BCA0466158CB94B0034CB4A /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */; };
4BD8C1291736F43200DC4B6F /* IconsFreeMindToQmind.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850938 /* IconsFreeMindToQmind.plist */; };
4BDA7813170F80F5000AB84A /* sparkle-pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */; };
4BDC9D901524EEAD008CEB8E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4BDC9D8E1524EEAD008CEB8E /* Localizable.strings */; };
Expand Down Expand Up @@ -381,6 +381,7 @@
1929BC2901D96DABE95AE4BB /* QMIconTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconTest.m; sourceTree = "<group>"; };
1929BC9E791535ADC6E79637 /* QMCacaoTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCacaoTestCase.h; sourceTree = "<group>"; };
1929BF6379805052FA43883B /* QMTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTypes.h; sourceTree = "<group>"; };
1929BF92908230239CB415EA /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
1929BFC33C586805007B7B9E /* QMManualBeanProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMManualBeanProvider.h; sourceTree = "<group>"; };
4B03B23F1628724000E5ECA2 /* TBCacao.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TBCacao.xcodeproj; path = tbcacao/TBCacao.xcodeproj; sourceTree = "<group>"; };
4B15776516A2EFEF0048480E /* Qkit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Qkit.xcodeproj; path = qkit/Qkit.xcodeproj; sourceTree = "<group>"; };
Expand All @@ -400,9 +401,6 @@
4B6B790F151F114600E4C968 /* ToolbarNewNodeTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ToolbarNewNodeTemplate.png; path = Resources/ToolbarNewNodeTemplate.png; sourceTree = "<group>"; };
4B8564C114E461DC00C6FF0A /* Qmind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Qmind.app; sourceTree = BUILT_PRODUCTS_DIR; };
4B8564C514E461DC00C6FF0A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
4B8564C814E461DC00C6FF0A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
4B8564C914E461DC00C6FF0A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
4B8564CA14E461DC00C6FF0A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4B8564CD14E461DC00C6FF0A /* Qmind-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Qmind-Info.plist"; sourceTree = "<group>"; };
4B8564CF14E461DC00C6FF0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
4B8564D114E461DC00C6FF0A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -459,7 +457,6 @@
4B992F071735176D00C5844E /* QmindLook-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "QmindLook-Prefix.pch"; sourceTree = "<group>"; };
4B992F1A173545CD00C5844E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = "<group>"; };
4B9DE3331569367500AAF5C1 /* QmindIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = QmindIcon.icns; path = Resources/QmindIcon.icns; sourceTree = "<group>"; };
4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework; sourceTree = "<absolute>"; };
4BDA7812170F80F5000AB84A /* sparkle-pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "sparkle-pub.pem"; path = "Resources/sparkle-pub.pem"; sourceTree = "<group>"; };
4BDC9D8F1524EEAD008CEB8E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
4BE684AA16922E9000789892 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IconCollectionViewItem.xib; sourceTree = "<group>"; };
Expand All @@ -469,7 +466,7 @@
4BE684B616922F6D00789892 /* QMIconGridView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconGridView.m; sourceTree = "<group>"; };
4BFCD74D14F3D33600850924 /* QMAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMAppDelegate.h; path = Qmind/QMAppDelegate.h; sourceTree = "<group>"; };
4BFCD74E14F3D33600850924 /* QMAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMAppDelegate.m; path = Qmind/QMAppDelegate.m; sourceTree = "<group>"; };
4BFCD75614F3D34700850924 /* QmindSenTesting.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QmindSenTesting.octest; sourceTree = BUILT_PRODUCTS_DIR; };
4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QmindSenTesting.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4BFCD7AC14F3E32A00850925 /* QMCellDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellDrawer.m; sourceTree = "<group>"; };
4BFCD7AC14F3E32A00850929 /* QMCellDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellDrawer.h; sourceTree = "<group>"; };
4BFCD7AC14F3E32A0085092D /* cell-layout-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "cell-layout-test.mm"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -544,9 +541,9 @@
4B15777416A2EFFE0048480E /* QTestKit.framework in Frameworks */,
4B03B2511628726500E5ECA2 /* TBCacao.framework in Frameworks */,
4BFCD75814F3D34700850924 /* Cocoa.framework in Frameworks */,
4BCA0466158CB94B0034CB4A /* SenTestingKit.framework in Frameworks */,
4BFCD76E14F3D53300850924 /* OCMockito.framework in Frameworks */,
4BFCD76F14F3D53300850924 /* OCHamcrest.framework in Frameworks */,
1929B0840D140F224C35878C /* XCTest.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -651,7 +648,7 @@
isa = PBXGroup;
children = (
4B8564C114E461DC00C6FF0A /* Qmind.app */,
4BFCD75614F3D34700850924 /* QmindSenTesting.octest */,
4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */,
4B992EF21735176D00C5844E /* QmindLook.qlgenerator */,
);
name = Products;
Expand All @@ -661,29 +658,18 @@
isa = PBXGroup;
children = (
4B992F1A173545CD00C5844E /* Sparkle.framework */,
4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */,
4B85653514E46D6800C6FF5D /* OCMockito.framework */,
4B85653514E46D6800C6FF1D /* OCHamcrest.framework */,
4B8564C514E461DC00C6FF0A /* Cocoa.framework */,
4B992EF31735176D00C5844E /* QuickLook.framework */,
4B992EF51735176D00C5844E /* ApplicationServices.framework */,
4B992EF71735176D00C5844E /* CoreServices.framework */,
4B992EF91735176D00C5844E /* CoreFoundation.framework */,
4B8564C714E461DC00C6FF0A /* Other Frameworks */,
1929BF92908230239CB415EA /* XCTest.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
4B8564C714E461DC00C6FF0A /* Other Frameworks */ = {
isa = PBXGroup;
children = (
4B8564C814E461DC00C6FF0A /* AppKit.framework */,
4B8564C914E461DC00C6FF0A /* CoreData.framework */,
4B8564CA14E461DC00C6FF0A /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
4B8564CB14E461DC00C6FF0A /* Qmind */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1032,8 +1018,8 @@
);
name = QmindSenTesting;
productName = QmindTesting;
productReference = 4BFCD75614F3D34700850924 /* QmindSenTesting.octest */;
productType = "com.apple.product-type.bundle";
productReference = 4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

Expand Down Expand Up @@ -1587,16 +1573,14 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"$(DEVELOPER_FRAMEWORKS_DIR)",
/Library/Frameworks,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "QmindTest/QmindTest-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_AFTER_BUILD = NO;
USER_HEADER_SEARCH_PATHS = "\"${PROJECT_DIR}/qkit\"/** \"${PROJECT_DIR}/tbcacao\"/**";
WRAPPER_EXTENSION = octest;
};
name = Debug;
};
Expand All @@ -1605,16 +1589,14 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_LIBRARY_DIR)/Frameworks",
"$(DEVELOPER_FRAMEWORKS_DIR)",
/Library/Frameworks,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "QmindTest/QmindTest-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_AFTER_BUILD = NO;
USER_HEADER_SEARCH_PATHS = "\"${PROJECT_DIR}/qkit\"/** \"${PROJECT_DIR}/tbcacao\"/**";
WRAPPER_EXTENSION = octest;
};
name = Release;
};
Expand Down
59 changes: 59 additions & 0 deletions Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4B992EF11735176D00C5844E"
BuildableName = "QmindLook.qlgenerator"
BlueprintName = "QmindLook"
ReferencedContainer = "container:Qmind.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
4 changes: 2 additions & 2 deletions Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4BFCD75514F3D34700850924"
BuildableName = "QmindSenTesting.octest"
BuildableName = "QmindSenTesting.xctest"
BlueprintName = "QmindSenTesting"
ReferencedContainer = "container:Qmind.xcodeproj">
</BuildableReference>
Expand All @@ -33,7 +33,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4BFCD75514F3D34700850924"
BuildableName = "QmindSenTesting.octest"
BuildableName = "QmindSenTesting.xctest"
BlueprintName = "QmindSenTesting"
ReferencedContainer = "container:Qmind.xcodeproj">
</BuildableReference>
Expand Down
6 changes: 3 additions & 3 deletions QmindTest/QMBaseTestCase.h
Expand Up @@ -6,7 +6,7 @@
* See LICENSE
*/

#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>

#define HC_SHORTHAND
#import <OCHamcrest/OCHamcrest.h>
Expand All @@ -20,7 +20,7 @@
#define consistsOf(...) contains(__VA_ARGS__, nil)
#define consistsOfInAnyOrder(...) containsInAnyOrder(__VA_ARGS__, nil)

#define FAIL STFail(@"yet to be implemented")
#define FAIL XCTFail(@"yet to be implemented")

@interface QMBaseTestCase : SenTestCase @end
@interface QMBaseTestCase : XCTestCase @end

0 comments on commit e6a496d

Please sign in to comment.