From e6a496d14d5e7a839a5a78b8caf9c407165800e7 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sun, 29 Sep 2013 14:31:30 +0200 Subject: [PATCH] #10 migrate to XCTest --- Qmind.xcodeproj/project.pbxproj | 38 ++++-------- .../xcshareddata/xcschemes/QmindLook.xcscheme | 59 +++++++++++++++++++ .../xcshareddata/xcschemes/Tests.xcscheme | 4 +- QmindTest/QMBaseTestCase.h | 6 +- 4 files changed, 74 insertions(+), 33 deletions(-) create mode 100644 Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme diff --git a/Qmind.xcodeproj/project.pbxproj b/Qmind.xcodeproj/project.pbxproj index 659ddf1..4c3fa2e 100644 --- a/Qmind.xcodeproj/project.pbxproj +++ b/Qmind.xcodeproj/project.pbxproj @@ -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 */; }; @@ -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 */; }; @@ -381,6 +381,7 @@ 1929BC2901D96DABE95AE4BB /* QMIconTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconTest.m; sourceTree = ""; }; 1929BC9E791535ADC6E79637 /* QMCacaoTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCacaoTestCase.h; sourceTree = ""; }; 1929BF6379805052FA43883B /* QMTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTypes.h; sourceTree = ""; }; + 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 = ""; }; 4B03B23F1628724000E5ECA2 /* TBCacao.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TBCacao.xcodeproj; path = tbcacao/TBCacao.xcodeproj; sourceTree = ""; }; 4B15776516A2EFEF0048480E /* Qkit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Qkit.xcodeproj; path = qkit/Qkit.xcodeproj; sourceTree = ""; }; @@ -400,9 +401,6 @@ 4B6B790F151F114600E4C968 /* ToolbarNewNodeTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ToolbarNewNodeTemplate.png; path = Resources/ToolbarNewNodeTemplate.png; sourceTree = ""; }; 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 = ""; }; 4B8564CF14E461DC00C6FF0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 4B8564D114E461DC00C6FF0A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -459,7 +457,6 @@ 4B992F071735176D00C5844E /* QmindLook-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "QmindLook-Prefix.pch"; sourceTree = ""; }; 4B992F1A173545CD00C5844E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = ""; }; 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = QmindIcon.icns; path = Resources/QmindIcon.icns; sourceTree = ""; }; - 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework; sourceTree = ""; }; 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "sparkle-pub.pem"; path = "Resources/sparkle-pub.pem"; sourceTree = ""; }; 4BDC9D8F1524EEAD008CEB8E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 4BE684AA16922E9000789892 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IconCollectionViewItem.xib; sourceTree = ""; }; @@ -469,7 +466,7 @@ 4BE684B616922F6D00789892 /* QMIconGridView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconGridView.m; sourceTree = ""; }; 4BFCD74D14F3D33600850924 /* QMAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMAppDelegate.h; path = Qmind/QMAppDelegate.h; sourceTree = ""; }; 4BFCD74E14F3D33600850924 /* QMAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMAppDelegate.m; path = Qmind/QMAppDelegate.m; sourceTree = ""; }; - 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 = ""; }; 4BFCD7AC14F3E32A00850929 /* QMCellDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellDrawer.h; sourceTree = ""; }; 4BFCD7AC14F3E32A0085092D /* cell-layout-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "cell-layout-test.mm"; sourceTree = ""; }; @@ -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; }; @@ -651,7 +648,7 @@ isa = PBXGroup; children = ( 4B8564C114E461DC00C6FF0A /* Qmind.app */, - 4BFCD75614F3D34700850924 /* QmindSenTesting.octest */, + 4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */, 4B992EF21735176D00C5844E /* QmindLook.qlgenerator */, ); name = Products; @@ -661,7 +658,6 @@ isa = PBXGroup; children = ( 4B992F1A173545CD00C5844E /* Sparkle.framework */, - 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */, 4B85653514E46D6800C6FF5D /* OCMockito.framework */, 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */, 4B8564C514E461DC00C6FF0A /* Cocoa.framework */, @@ -669,21 +665,11 @@ 4B992EF51735176D00C5844E /* ApplicationServices.framework */, 4B992EF71735176D00C5844E /* CoreServices.framework */, 4B992EF91735176D00C5844E /* CoreFoundation.framework */, - 4B8564C714E461DC00C6FF0A /* Other Frameworks */, + 1929BF92908230239CB415EA /* XCTest.framework */, ); name = Frameworks; sourceTree = ""; }; - 4B8564C714E461DC00C6FF0A /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 4B8564C814E461DC00C6FF0A /* AppKit.framework */, - 4B8564C914E461DC00C6FF0A /* CoreData.framework */, - 4B8564CA14E461DC00C6FF0A /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; 4B8564CB14E461DC00C6FF0A /* Qmind */ = { isa = PBXGroup; children = ( @@ -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 */ @@ -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; }; @@ -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; }; diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme new file mode 100644 index 0000000..4778a8e --- /dev/null +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme index 4fcc2b8..6417165 100644 --- a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme @@ -15,7 +15,7 @@ @@ -33,7 +33,7 @@ diff --git a/QmindTest/QMBaseTestCase.h b/QmindTest/QMBaseTestCase.h index a5352e6..f9d8670 100644 --- a/QmindTest/QMBaseTestCase.h +++ b/QmindTest/QMBaseTestCase.h @@ -6,7 +6,7 @@ * See LICENSE */ -#import +#import #define HC_SHORTHAND #import @@ -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