From 48e6751fa18dd030815917c2f613fa6604e05cb8 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 17 Oct 2010 14:03:37 +0000 Subject: Tidy up the project's logical structure in Xcode. --- UnitTests/SPDatabaseInfoTest.h | 8 +- UnitTests/SPDatabaseInfoTest.m | 24 +++-- UnitTests/SPDatabaseRenameTest.h | 6 +- UnitTests/SPDatabaseRenameTest.m | 27 ++++-- sequel-pro.xcodeproj/project.pbxproj | 176 +++++++++++++++++++++-------------- 5 files changed, 147 insertions(+), 94 deletions(-) diff --git a/UnitTests/SPDatabaseInfoTest.h b/UnitTests/SPDatabaseInfoTest.h index 81763b4a..ed0093c5 100644 --- a/UnitTests/SPDatabaseInfoTest.h +++ b/UnitTests/SPDatabaseInfoTest.h @@ -23,18 +23,14 @@ // // More info at -#define USE_APPLICATION_UNIT_TEST 1 - #import +#define USE_APPLICATION_UNIT_TEST 1 -@interface SPDatabaseInfoTest : SenTestCase { - -} +@interface SPDatabaseInfoTest : SenTestCase - (void)testDatabaseExists; - (void)testListDBs; - (void)testListDBsLike; - @end diff --git a/UnitTests/SPDatabaseInfoTest.m b/UnitTests/SPDatabaseInfoTest.m index a53104e9..fc2309e3 100644 --- a/UnitTests/SPDatabaseInfoTest.m +++ b/UnitTests/SPDatabaseInfoTest.m @@ -24,28 +24,35 @@ // More info at #import + #import "SPDatabaseInfo.h" #import "SPDatabaseInfoTest.h" - @implementation SPDatabaseInfoTest -- (SPDatabaseInfo *)getDatabaseInfoFixture { +- (SPDatabaseInfo *)getDatabaseInfoFixture +{ SPDatabaseInfo *dbInfo = [[SPDatabaseInfo alloc] init]; + return dbInfo; } -- (id) getMockConnection { +- (id) getMockConnection +{ id mockConnection = [OCMockObject niceMockForClass:[MCPConnection class]]; + return mockConnection; } -- (id) getMockMCPResult { +- (id) getMockMCPResult +{ id mockResult = [OCMockObject niceMockForClass:[MCPResult class]]; + return mockResult; } -- (void)testDatabaseExists { +- (void)testDatabaseExists +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; NSArray *tables = [[NSArray alloc] initWithObjects: @"db_one", nil]; @@ -62,7 +69,8 @@ [mockConnection verify]; } -- (void)testListDBs { +- (void)testListDBs +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; id mockConnection = [self getMockConnection]; [[mockConnection expect] queryString:@"SHOW DATABASES"]; @@ -71,7 +79,8 @@ [mockConnection verify]; } -- (void)testListDBsLike { +- (void)testListDBsLike +{ SPDatabaseInfo *dbInfo = [self getDatabaseInfoFixture]; id mockConnection = [self getMockConnection]; [[mockConnection expect] queryString:@"SHOW DATABASES LIKE `test_db`"]; @@ -80,5 +89,4 @@ [mockConnection verify]; } - @end diff --git a/UnitTests/SPDatabaseRenameTest.h b/UnitTests/SPDatabaseRenameTest.h index 473f4716..e3ac19cc 100644 --- a/UnitTests/SPDatabaseRenameTest.h +++ b/UnitTests/SPDatabaseRenameTest.h @@ -23,12 +23,12 @@ // // More info at +#import + #define USE_APPLICATION_UNIT_TEST 1 -#import +@interface SPDatabaseRenameTest : SenTestCase -@interface SPDatabaseRenameTest : SenTestCase { -} - (void) testRenameDatabase; - (void) testCreateDatabase; diff --git a/UnitTests/SPDatabaseRenameTest.m b/UnitTests/SPDatabaseRenameTest.m index 51562db9..7e787caa 100644 --- a/UnitTests/SPDatabaseRenameTest.m +++ b/UnitTests/SPDatabaseRenameTest.m @@ -24,6 +24,7 @@ // More info at #import + #import "SPDatabaseRenameTest.h" #import "SPDatabaseRename.h" #import "SPTableCopy.h" @@ -32,31 +33,38 @@ #import "SPStringAdditions.h" #import "SPLogger.h" - @implementation SPDatabaseRenameTest -- (SPDatabaseRename *) getDatabaseRenameFixture { +- (SPDatabaseRename *) getDatabaseRenameFixture +{ SPDatabaseRename *dbRename = [[SPDatabaseRename alloc] init]; + return [dbRename autorelease]; } -- (SPTableCopy *) getTableCopyFixture { +- (SPTableCopy *)getTableCopyFixture +{ SPTableCopy *tableCopy = [[SPTableCopy alloc] init]; + return [tableCopy autorelease]; } -- (id) getMockConnection { +- (id)getMockConnection +{ id mockConnection = [OCMockObject niceMockForClass:[MCPConnection class]]; - return mockConnection; + + eturn mockConnection; } -- (id) getMockDBInfo { +- (id)getMockDBInfo +{ id mockDBInfo = [OCMockObject niceMockForClass:[SPDatabaseInfo class]]; + return mockDBInfo; } -- (void) testRenameDatabase { - +- (void)testRenameDatabase +{ SPDatabaseRename *dbRename = [self getDatabaseRenameFixture]; id mockConnection = [self getMockConnection]; @@ -84,7 +92,8 @@ [target release]; } -- (void) testCreateDatabase { +- (void)testCreateDatabase +{ SPDatabaseRename *dbRename = [self getDatabaseRenameFixture]; } diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 8a00f592..906b0b53 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -1201,7 +1201,7 @@ name = "Other Frameworks"; sourceTree = ""; }; - 1198F5B01174EDA700670590 /* DatabaseActions */ = { + 1198F5B01174EDA700670590 /* Database Actions */ = { isa = PBXGroup; children = ( 1198F5B11174EDD500670590 /* SPDatabaseCopy.h */, @@ -1215,18 +1215,10 @@ 11B55BFC1189E3B2009EF465 /* SPDBActionCommons.h */, 11B55BFD1189E3B2009EF465 /* SPDBActionCommons.m */, ); - name = DatabaseActions; + name = "Database Actions"; sourceTree = ""; }; - 1198F5B41174EDDE00670590 /* Other */ = { - isa = PBXGroup; - children = ( - 1198F5B51174EDE400670590 /* DatabaseActions */, - ); - name = Other; - sourceTree = ""; - }; - 1198F5B51174EDE400670590 /* DatabaseActions */ = { + 1198F5B41174EDDE00670590 /* Database Actions */ = { isa = PBXGroup; children = ( 1198F5C21174EF3F00670590 /* SPDatabaseCopyTest.h */, @@ -1238,7 +1230,7 @@ 11C210DD1180E9B800758039 /* SPDatabaseRenameTest.h */, 11C210DE1180E9B800758039 /* SPDatabaseRenameTest.m */, ); - name = DatabaseActions; + name = "Database Actions"; sourceTree = ""; }; 17128B890FE6DFFA0035DD75 /* QuickLook */ = { @@ -1252,6 +1244,8 @@ 171312CF109D23CA00FB465F /* Cells */ = { isa = PBXGroup; children = ( + BC878A6F121A836F00AE5066 /* SPColorWellCell.h */, + BC878A70121A836F00AE5066 /* SPColorWellCell.m */, 17E641680EF01F37001BC333 /* ImageAndTextCell.h */, 17E641690EF01F37001BC333 /* ImageAndTextCell.m */, 58D2E228101222670063EF1D /* SPTextAndLinkCell.h */, @@ -1438,8 +1432,8 @@ 1740F8360FC306AE00CF3699 /* Scripting */ = { isa = PBXGroup; children = ( - 17E641F80EF02088001BC333 /* sequel-pro.scriptTerminology */, 17E641F70EF02088001BC333 /* sequel-pro.scriptSuite */, + 17E641F80EF02088001BC333 /* sequel-pro.scriptTerminology */, ); path = Scripting; sourceTree = ""; @@ -1595,6 +1589,82 @@ name = Icons; sourceTree = ""; }; + 17DC8825126B222D00E9AAEC /* Third Party */ = { + isa = PBXGroup; + children = ( + 5841929F101E57BB0089807F /* NSMutableArray-MultipleSort.h */, + 584192A0101E57BB0089807F /* NSMutableArray-MultipleSort.m */, + 58C34F5110B86CAE00D37E14 /* NSNotificationAdditions.h */, + 58C34F5210B86CAE00D37E14 /* NSNotificationAdditions.m */, + 17DC8826126B22F200E9AAEC /* Views */, + 58B909A111C3B8EC000826E5 /* Localization */, + 296DC8A40F90914B002A3258 /* MGTemplateEngine */, + ); + name = "Third Party"; + sourceTree = ""; + }; + 17DC8826126B22F200E9AAEC /* Views */ = { + isa = PBXGroup; + children = ( + 5841423D0F97E11000A34B47 /* NoodleLineNumberView.h */, + 5841423E0F97E11000A34B47 /* NoodleLineNumberView.m */, + BC05F1C3101241DF008A97F8 /* YRKSpinningProgressIndicator.h */, + BC05F1C4101241DF008A97F8 /* YRKSpinningProgressIndicator.m */, + ); + name = Views; + sourceTree = ""; + }; + 17DC8827126B32F300E9AAEC /* Table Views */ = { + isa = PBXGroup; + children = ( + BC8C8530100E0A8000D7A129 /* SPTableView.h */, + BC8C8531100E0A8000D7A129 /* SPTableView.m */, + BC398A2B121D526200BE3EF4 /* SPCopyTable.h */, + BC398A2C121D526200BE3EF4 /* SPCopyTable.m */, + ); + name = "Table Views"; + sourceTree = ""; + }; + 17DC8828126B332F00E9AAEC /* Accessory Views */ = { + isa = PBXGroup; + children = ( + 29A1B7E30FD1293A000B88E8 /* SPPrintAccessory.h */, + 29A1B7E40FD1293A000B88E8 /* SPPrintAccessory.m */, + BC01BCCD104024BE006BDEE7 /* SPEncodingPopupAccessory.h */, + BC01BCCE104024BE006BDEE7 /* SPEncodingPopupAccessory.m */, + ); + name = "Accessory Views"; + sourceTree = ""; + }; + 17DC8829126B337900E9AAEC /* Text Views */ = { + isa = PBXGroup; + children = ( + 17E641800EF01FA8001BC333 /* SPTextView.h */, + 17E641810EF01FA8001BC333 /* SPTextView.m */, + BC1847E80FE6EC8400094BFB /* SPEditSheetTextView.h */, + BC1847E90FE6EC8400094BFB /* SPEditSheetTextView.m */, + ); + name = "Text Views"; + sourceTree = ""; + }; + 17DC885B126B36CF00E9AAEC /* MCPKit */ = { + isa = PBXGroup; + children = ( + 380F4F230FC0C3D300B0BFD7 /* MCPKitTest.h */, + 380F4F240FC0C3D300B0BFD7 /* MCPKitTest.m */, + ); + name = MCPKit; + sourceTree = ""; + }; + 17DC886A126B378A00E9AAEC /* Category Additions */ = { + isa = PBXGroup; + children = ( + 380F4EF30FC0B68F00B0BFD7 /* SPStringAdditionsTest.h */, + 380F4EF40FC0B68F00B0BFD7 /* SPStringAdditionsTest.m */, + ); + name = "Category Additions"; + sourceTree = ""; + }; 17DD52D0115075B1007D8950 /* Help */ = { isa = PBXGroup; children = ( @@ -1651,6 +1721,7 @@ 17E6415D0EF01EF9001BC333 /* Model */, 17E641670EF01F19001BC333 /* Views */, 17E6416E0EF01F3B001BC333 /* Other */, + 17DC8825126B222D00E9AAEC /* Third Party */, 58B906F811BD9B34000826E5 /* PSMTabBar */, 17B7B5551016002900F057DE /* MCPKit */, ); @@ -1696,13 +1767,13 @@ 17E6415D0EF01EF9001BC333 /* Model */ = { isa = PBXGroup; children = ( - 173E70A1107FF495008733C9 /* Core Data */, 172A650F0F7BED7A001E861A /* SPConsoleMessage.h */, 172A65100F7BED7A001E861A /* SPConsoleMessage.m */, 17C058860FC9FC390077E9CF /* SPNarrowDownCompletion.h */, 17C058870FC9FC390077E9CF /* SPNarrowDownCompletion.m */, BCA6271A1031B9D40047E5D5 /* SPTooltip.h */, BCA6271B1031B9D40047E5D5 /* SPTooltip.m */, + 173E70A1107FF495008733C9 /* Core Data */, ); name = Model; sourceTree = ""; @@ -1710,14 +1781,19 @@ 17E641670EF01F19001BC333 /* Views */ = { isa = PBXGroup; children = ( + 17E6417E0EF01FA8001BC333 /* SPImageView.h */, + 17E6417F0EF01FA8001BC333 /* SPImageView.m */, + 584094CC1107BD0500260CFD /* SPAlertSheets.h */, + 584095181107CB6600260CFD /* SPAlertSheets.m */, + 58C56EF30F438E120035701E /* SPDataCellFormatter.h */, + 58C56EF40F438E120035701E /* SPDataCellFormatter.m */, + BC2898F1125F4488001B50E1 /* SPGeometryDataView.h */, + BC2898F2125F4488001B50E1 /* SPGeometryDataView.m */, 171312CF109D23CA00FB465F /* Cells */, + 17DC8829126B337900E9AAEC /* Text Views */, + 17DC8827126B32F300E9AAEC /* Table Views */, 17DF51241163C68600E3F396 /* Outline Views */, - BC01BCCD104024BE006BDEE7 /* SPEncodingPopupAccessory.h */, - BC01BCCE104024BE006BDEE7 /* SPEncodingPopupAccessory.m */, - 29A1B7E30FD1293A000B88E8 /* SPPrintAccessory.h */, - 29A1B7E40FD1293A000B88E8 /* SPPrintAccessory.m */, - BC8C8530100E0A8000D7A129 /* SPTableView.h */, - BC8C8531100E0A8000D7A129 /* SPTableView.m */, + 17DC8828126B332F00E9AAEC /* Accessory Views */, ); name = Views; sourceTree = ""; @@ -1725,17 +1801,14 @@ 17E6416E0EF01F3B001BC333 /* Other */ = { isa = PBXGroup; children = ( - 296DC8A40F90914B002A3258 /* MGTemplateEngine */, - 1198F5B01174EDA700670590 /* DatabaseActions */, + 1198F5B01174EDA700670590 /* Database Actions */, 17128B890FE6DFFA0035DD75 /* QuickLook */, - 583CE39511722B70008F148E /* Compression */, + 583CE39511722B70008F148E /* File Compression */, 173284E51088FEC20062E892 /* Data */, 17E6416F0EF01F4C001BC333 /* Keychain */, 58FEF15E0F23D60A00518E8E /* Parsing */, - 17E641710EF01F5C001BC333 /* GUI */, - 17E641720EF01F6B001BC333 /* SSHTunnel */, + 17E641720EF01F6B001BC333 /* SSH Tunnel */, B57747D60F7A8990003B34F9 /* Category Additions */, - 58B909A111C3B8EC000826E5 /* Localization */, 584754CC120A05660057631F /* QuickLook Plugin */, 58DA884E103E1597000B98DF /* Debugging & Support */, ); @@ -1751,41 +1824,14 @@ name = Keychain; sourceTree = ""; }; - 17E641710EF01F5C001BC333 /* GUI */ = { - isa = PBXGroup; - children = ( - BC398A2B121D526200BE3EF4 /* SPCopyTable.h */, - BC398A2C121D526200BE3EF4 /* SPCopyTable.m */, - 17E6417E0EF01FA8001BC333 /* SPImageView.h */, - 17E6417F0EF01FA8001BC333 /* SPImageView.m */, - 17E641800EF01FA8001BC333 /* SPTextView.h */, - 17E641810EF01FA8001BC333 /* SPTextView.m */, - 58C56EF30F438E120035701E /* SPDataCellFormatter.h */, - 58C56EF40F438E120035701E /* SPDataCellFormatter.m */, - BC1847E80FE6EC8400094BFB /* SPEditSheetTextView.h */, - BC1847E90FE6EC8400094BFB /* SPEditSheetTextView.m */, - 5841423D0F97E11000A34B47 /* NoodleLineNumberView.h */, - 5841423E0F97E11000A34B47 /* NoodleLineNumberView.m */, - BC05F1C3101241DF008A97F8 /* YRKSpinningProgressIndicator.h */, - BC05F1C4101241DF008A97F8 /* YRKSpinningProgressIndicator.m */, - 584094CC1107BD0500260CFD /* SPAlertSheets.h */, - 584095181107CB6600260CFD /* SPAlertSheets.m */, - BC878A6F121A836F00AE5066 /* SPColorWellCell.h */, - BC878A70121A836F00AE5066 /* SPColorWellCell.m */, - BC2898F1125F4488001B50E1 /* SPGeometryDataView.h */, - BC2898F2125F4488001B50E1 /* SPGeometryDataView.m */, - ); - name = GUI; - sourceTree = ""; - }; - 17E641720EF01F6B001BC333 /* SSHTunnel */ = { + 17E641720EF01F6B001BC333 /* SSH Tunnel */ = { isa = PBXGroup; children = ( 58CDB32E0FCE138D00F8ACA3 /* SPSSHTunnel.h */, 58CDB32F0FCE138D00F8ACA3 /* SPSSHTunnel.m */, 58CDB3310FCE139C00F8ACA3 /* SequelProTunnelAssistant.m */, ); - name = SSHTunnel; + name = "SSH Tunnel"; sourceTree = ""; }; 17E6418B0EF01FF7001BC333 /* Images */ = { @@ -2002,24 +2048,22 @@ 380F4EF20FC0B67A00B0BFD7 /* Unit Tests */ = { isa = PBXGroup; children = ( - 1198F5B41174EDDE00670590 /* Other */, - 380F4F230FC0C3D300B0BFD7 /* MCPKitTest.h */, - 380F4F240FC0C3D300B0BFD7 /* MCPKitTest.m */, - 380F4EF30FC0B68F00B0BFD7 /* SPStringAdditionsTest.h */, - 380F4EF40FC0B68F00B0BFD7 /* SPStringAdditionsTest.m */, + 17DC885B126B36CF00E9AAEC /* MCPKit */, + 1198F5B41174EDDE00670590 /* Database Actions */, + 17DC886A126B378A00E9AAEC /* Category Additions */, ); name = "Unit Tests"; path = UnitTests; sourceTree = ""; }; - 583CE39511722B70008F148E /* Compression */ = { + 583CE39511722B70008F148E /* File Compression */ = { isa = PBXGroup; children = ( 583CE39C11722B84008F148E /* zlib.1.2.4.h */, 5885CF48116A63B200A85ACB /* SPFileHandle.h */, 5885CF49116A63B200A85ACB /* SPFileHandle.m */, ); - name = Compression; + name = "File Compression"; sourceTree = ""; }; 584754CC120A05660057631F /* QuickLook Plugin */ = { @@ -2057,7 +2101,6 @@ 58B906F811BD9B34000826E5 /* PSMTabBar */ = { isa = PBXGroup; children = ( - 58B906F911BD9B34000826E5 /* Images */, 58B9071611BD9B34000826E5 /* NSBezierPath_AMShading.h */, 58B9071711BD9B34000826E5 /* NSBezierPath_AMShading.m */, 58B9071811BD9B34000826E5 /* NSString_AITruncation.h */, @@ -2084,6 +2127,7 @@ 58B9072D11BD9B34000826E5 /* PSMTabDragWindowController.m */, 58B9072E11BD9B34000826E5 /* PSMTabStyle.h */, 58B9072F11BD9B34000826E5 /* Styles */, + 58B906F911BD9B34000826E5 /* Images */, ); name = PSMTabBar; path = Frameworks/PSMTabBar; @@ -2155,8 +2199,8 @@ 58B909A111C3B8EC000826E5 /* Localization */ = { isa = PBXGroup; children = ( - 58B909A411C3B919000826E5 /* DMLocalizedNibBundle.m */, 589ED05A11E0ACD100C1DCEA /* DMLocalizedNib.m */, + 58B909A411C3B919000826E5 /* DMLocalizedNibBundle.m */, 58B9095B11C3A3EC000826E5 /* xibLocalizationPostprocessor.m */, ); name = Localization; @@ -2191,10 +2235,6 @@ children = ( B52460D30F8EF92300171639 /* SPArrayAdditions.h */, B52460D40F8EF92300171639 /* SPArrayAdditions.m */, - 5841929F101E57BB0089807F /* NSMutableArray-MultipleSort.h */, - 584192A0101E57BB0089807F /* NSMutableArray-MultipleSort.m */, - 58C34F5110B86CAE00D37E14 /* NSNotificationAdditions.h */, - 58C34F5210B86CAE00D37E14 /* NSNotificationAdditions.m */, 1789343A0F30C1DD0097539A /* SPStringAdditions.h */, 1789343B0F30C1DD0097539A /* SPStringAdditions.m */, B52460D50F8EF92300171639 /* SPTextViewAdditions.h */, -- cgit v1.2.3