Skip to content

Commit 1e4d40f

Browse files
committed
Merge branch 'master' of https://github.com/sequelpro/sequelpro
2 parents 2301018 + 9661985 commit 1e4d40f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+490
-306
lines changed

Frameworks/PostgresKit/PostgresKit.xcodeproj/project.pbxproj

+24-20
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
1724CA3B15F9EE7300AB2291 /* libpqtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libpqtypes.h; sourceTree = "<group>"; };
8282
1724CC9015FB4CC200AB2291 /* PGPostgresTimeTZ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGPostgresTimeTZ.h; sourceTree = "<group>"; };
8383
1724CC9115FB4CC200AB2291 /* PGPostgresTimeTZ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PGPostgresTimeTZ.m; sourceTree = "<group>"; };
84-
1724CD0415FB68E800AB2291 /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
84+
1724CD0415FB68E800AB2291 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8585
1724CD0515FB68E800AB2291 /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Tests-Info.plist"; path = "Resources/Tests-Info.plist"; sourceTree = "<group>"; };
8686
1724CD5715FB8A3300AB2291 /* PGPostgresTimeInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PGPostgresTimeInterval.h; sourceTree = "<group>"; };
8787
1724CD5815FB8A3300AB2291 /* PGPostgresTimeInterval.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PGPostgresTimeInterval.m; sourceTree = "<group>"; };
@@ -167,7 +167,7 @@
167167
isa = PBXGroup;
168168
children = (
169169
8DC2EF5B0486A6940098B216 /* PostgresKit.framework */,
170-
1724CD0415FB68E800AB2291 /* Tests.octest */,
170+
1724CD0415FB68E800AB2291 /* Tests.xctest */,
171171
);
172172
name = Products;
173173
sourceTree = "<group>";
@@ -460,8 +460,8 @@
460460
);
461461
name = Tests;
462462
productName = Tests;
463-
productReference = 1724CD0415FB68E800AB2291 /* Tests.octest */;
464-
productType = "com.apple.product-type.bundle";
463+
productReference = 1724CD0415FB68E800AB2291 /* Tests.xctest */;
464+
productType = "com.apple.product-type.bundle.unit-test";
465465
};
466466
8DC2EF4F0486A6940098B216 /* PostgresKit */ = {
467467
isa = PBXNativeTarget;
@@ -487,7 +487,7 @@
487487
0867D690FE84028FC02AAC07 /* Project object */ = {
488488
isa = PBXProject;
489489
attributes = {
490-
LastUpgradeCheck = 0500;
490+
LastUpgradeCheck = 0720;
491491
};
492492
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "PostgresKit" */;
493493
compatibilityVersion = "Xcode 3.2";
@@ -565,7 +565,7 @@
565565
CLANG_LINK_OBJC_RUNTIME = NO;
566566
COMBINE_HIDPI_IMAGES = YES;
567567
COPY_PHASE_STRIP = NO;
568-
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
568+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
569569
GCC_DYNAMIC_NO_PIC = NO;
570570
GCC_ENABLE_FIX_AND_CONTINUE = NO;
571571
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
@@ -576,12 +576,9 @@
576576
OTHER_LDFLAGS = (
577577
"-framework",
578578
Cocoa,
579-
"-framework",
580-
SenTestingKit,
581579
);
580+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit.tests;
582581
PRODUCT_NAME = Tests;
583-
TEST_AFTER_BUILD = YES;
584-
WRAPPER_EXTENSION = octest;
585582
};
586583
name = Debug;
587584
};
@@ -592,7 +589,7 @@
592589
CLANG_LINK_OBJC_RUNTIME = NO;
593590
COMBINE_HIDPI_IMAGES = YES;
594591
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
595-
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
592+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
596593
GCC_ENABLE_FIX_AND_CONTINUE = NO;
597594
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
598595
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -601,12 +598,9 @@
601598
OTHER_LDFLAGS = (
602599
"-framework",
603600
Cocoa,
604-
"-framework",
605-
SenTestingKit,
606601
);
602+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit.tests;
607603
PRODUCT_NAME = Tests;
608-
TEST_AFTER_BUILD = YES;
609-
WRAPPER_EXTENSION = octest;
610604
ZERO_LINK = NO;
611605
};
612606
name = Release;
@@ -617,7 +611,7 @@
617611
ALWAYS_SEARCH_USER_PATHS = NO;
618612
CLANG_LINK_OBJC_RUNTIME = NO;
619613
COMBINE_HIDPI_IMAGES = YES;
620-
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
614+
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
621615
GCC_ENABLE_FIX_AND_CONTINUE = NO;
622616
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
623617
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -626,12 +620,9 @@
626620
OTHER_LDFLAGS = (
627621
"-framework",
628622
Cocoa,
629-
"-framework",
630-
SenTestingKit,
631623
);
624+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit.tests;
632625
PRODUCT_NAME = Tests;
633-
TEST_AFTER_BUILD = YES;
634-
WRAPPER_EXTENSION = octest;
635626
};
636627
name = Distribution;
637628
};
@@ -645,8 +636,11 @@
645636
CLANG_WARN_EMPTY_BODY = YES;
646637
CLANG_WARN_ENUM_CONVERSION = YES;
647638
CLANG_WARN_INT_CONVERSION = YES;
639+
CLANG_WARN_UNREACHABLE_CODE = YES;
648640
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
641+
ENABLE_STRICT_OBJC_MSGSEND = YES;
649642
GCC_C_LANGUAGE_STANDARD = gnu99;
643+
GCC_NO_COMMON_BLOCKS = YES;
650644
GCC_PRECOMPILE_PREFIX_HEADER = YES;
651645
GCC_PREFIX_HEADER = "Source/PostgresKit-Prefix.pch";
652646
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
@@ -704,6 +698,7 @@
704698
"$(inherited)",
705699
"\"$(SRCROOT)/Libs\"/**",
706700
);
701+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit;
707702
PRODUCT_NAME = PostgresKit;
708703
WARNING_CFLAGS = "-Wmost";
709704
WRAPPER_EXTENSION = framework;
@@ -756,6 +751,7 @@
756751
"$(inherited)",
757752
"\"$(SRCROOT)/Libs\"/**",
758753
);
754+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit;
759755
PRODUCT_NAME = PostgresKit;
760756
WARNING_CFLAGS = "-Wmost";
761757
WRAPPER_EXTENSION = framework;
@@ -803,6 +799,7 @@
803799
"$(inherited)",
804800
"\"$(SRCROOT)/Libs\"/**",
805801
);
802+
PRODUCT_BUNDLE_IDENTIFIER = com.sequelpro.postgreskit;
806803
PRODUCT_NAME = PostgresKit;
807804
WARNING_CFLAGS = "-Wmost";
808805
WRAPPER_EXTENSION = framework;
@@ -819,8 +816,12 @@
819816
CLANG_WARN_EMPTY_BODY = YES;
820817
CLANG_WARN_ENUM_CONVERSION = YES;
821818
CLANG_WARN_INT_CONVERSION = YES;
819+
CLANG_WARN_UNREACHABLE_CODE = YES;
822820
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
821+
ENABLE_STRICT_OBJC_MSGSEND = YES;
822+
ENABLE_TESTABILITY = YES;
823823
GCC_C_LANGUAGE_STANDARD = gnu99;
824+
GCC_NO_COMMON_BLOCKS = YES;
824825
GCC_OPTIMIZATION_LEVEL = 0;
825826
GCC_PRECOMPILE_PREFIX_HEADER = YES;
826827
GCC_PREFIX_HEADER = "Source/PostgresKit-Prefix.pch";
@@ -849,8 +850,11 @@
849850
CLANG_WARN_EMPTY_BODY = YES;
850851
CLANG_WARN_ENUM_CONVERSION = YES;
851852
CLANG_WARN_INT_CONVERSION = YES;
853+
CLANG_WARN_UNREACHABLE_CODE = YES;
852854
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
855+
ENABLE_STRICT_OBJC_MSGSEND = YES;
853856
GCC_C_LANGUAGE_STANDARD = gnu99;
857+
GCC_NO_COMMON_BLOCKS = YES;
854858
GCC_PRECOMPILE_PREFIX_HEADER = YES;
855859
GCC_PREFIX_HEADER = "Source/PostgresKit-Prefix.pch";
856860
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;

Frameworks/PostgresKit/PostgresKit.xcodeproj/xcshareddata/xcschemes/PostgresKit.xcscheme

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0500"
3+
LastUpgradeVersion = "0720"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -33,12 +33,14 @@
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
3535
BlueprintIdentifier = "1724CD0315FB68E800AB2291"
36-
BuildableName = "Tests.octest"
36+
BuildableName = "Tests.xctest"
3737
BlueprintName = "Tests"
3838
ReferencedContainer = "container:PostgresKit.xcodeproj">
3939
</BuildableReference>
4040
</TestableReference>
4141
</Testables>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
4244
</TestAction>
4345
<LaunchAction
4446
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -48,7 +50,17 @@
4850
buildConfiguration = "Debug"
4951
ignoresPersistentStateOnLaunch = "NO"
5052
debugDocumentVersioning = "YES"
53+
debugServiceExtension = "internal"
5154
allowLocationSimulation = "YES">
55+
<MacroExpansion>
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
59+
BuildableName = "PostgresKit.framework"
60+
BlueprintName = "PostgresKit"
61+
ReferencedContainer = "container:PostgresKit.xcodeproj">
62+
</BuildableReference>
63+
</MacroExpansion>
5264
<AdditionalOptions>
5365
</AdditionalOptions>
5466
</LaunchAction>

Frameworks/PostgresKit/Resources/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>PostgresKit</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.sequelpro.postgreskit</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundlePackageType</key>

Frameworks/PostgresKit/Resources/Tests-Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>Tests</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.sequelpro.postgreskit.tests</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundlePackageType</key>

Frameworks/PostgresKit/Tests/PGDataTypeTests.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// OTHER DEALINGS IN THE SOFTWARE.
2828

2929
#import <PostgresKit/PostgresKit.h>
30-
#import <SenTestingKit/SenTestingKit.h>
30+
#import <XCTest/XCTest.h>
3131

3232
#import "PGPostgresIntegrationTestCase.h"
3333

Frameworks/PostgresKit/Tests/PGDataTypeTests.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ @interface PGDataTypeTests ()
3333
+ (void)_addTestForField:(NSString *)field
3434
withExpectedResult:(id)result
3535
connection:(PGPostgresConnection *)connection
36-
toTestSuite:(SenTestSuite *)testSuite;
36+
toTestSuite:(XCTestSuite *)testSuite;
3737

3838
@end
3939

@@ -48,7 +48,7 @@ @implementation PGDataTypeTests
4848

4949
+ (id)defaultTestSuite
5050
{
51-
SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:[self className]];
51+
XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:[self className]];
5252

5353
PGPostgresConnection *connection = [[PGPostgresConnection alloc] init];
5454

@@ -109,12 +109,12 @@ - (void)setUp
109109

110110
- (void)testResultValueIsNotNil
111111
{
112-
STAssertNotNil(_result, nil);
112+
XCTAssertNotNil(_result);
113113
}
114114

115115
- (void)testResultIsOfCorrectTypeAndValue
116116
{
117-
STAssertEqualObjects(_result, _expectedResult, nil);
117+
XCTAssertEqualObjects(_result, _expectedResult);
118118
}
119119

120120
#pragma mark -
@@ -123,11 +123,11 @@ - (void)testResultIsOfCorrectTypeAndValue
123123
+ (void)_addTestForField:(NSString *)field
124124
withExpectedResult:(id)result
125125
connection:(PGPostgresConnection *)connection
126-
toTestSuite:(SenTestSuite *)testSuite
126+
toTestSuite:(XCTestSuite *)testSuite
127127
{
128128
for (NSInvocation *invocation in [self testInvocations])
129129
{
130-
SenTestCase *test = [[[self class] alloc] initWithInvocation:invocation connection:connection expectedResult:result field:field];
130+
XCTestCase *test = [[[self class] alloc] initWithInvocation:invocation connection:connection expectedResult:result field:field];
131131

132132
[testSuite addTest:test];
133133

Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
// OTHER DEALINGS IN THE SOFTWARE.
2828

2929
#import <PostgresKit/PostgresKit.h>
30-
#import <SenTestingKit/SenTestingKit.h>
30+
#import <XCTest/XCTest.h>
3131

32-
@interface PGPostgresIntegrationTestCase : SenTestCase
32+
@interface PGPostgresIntegrationTestCase : XCTestCase
3333
{
3434
PGPostgresConnection *_connection;
3535
}

Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m

+15-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
static NSUInteger PGTestDatabasePort = 5432;
3737

38+
static double PGTestConnectionTimeout = 0.2;
39+
3840
@interface PGPostgresIntegrationTestCase ()
3941

4042
- (void)_establishConnection;
@@ -67,13 +69,25 @@ - (void)_establishConnection
6769
[_connection setPassword:PGTestDatabasePassword];
6870

6971
if (![_connection connect]) {
70-
STFail(@"Request to establish connection to local database failed.");
72+
XCTFail(@"Request to establish connection to local database failed.");
7173

7274
exit(1);
7375
}
7476

77+
NSDate *startDate = [NSDate date];
78+
7579
do {
7680
sleep(0.1);
81+
82+
if([[NSDate date] timeIntervalSinceDate:startDate] > PGTestConnectionTimeout) {
83+
XCTFail(@"Failed to connect to database after %f seconds. Host:%@ Database:%@ User:%@ Password:%@",
84+
PGTestConnectionTimeout,
85+
PGTestDatabaseHost,
86+
PGTestDatabaseName,
87+
PGTestDatabaseUser,
88+
PGTestDatabasePassword);
89+
exit(1);
90+
}
7791
}
7892
while (![_connection isConnected]);
7993
}

Frameworks/PostgresKit/Tests/PGPostgresResultTests.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// OTHER DEALINGS IN THE SOFTWARE.
2828

2929
#import <PostgresKit/PostgresKit.h>
30-
#import <SenTestingKit/SenTestingKit.h>
30+
#import <XCTest/XCTest.h>
3131

3232
#import "PGPostgresIntegrationTestCase.h"
3333

Frameworks/PostgresKit/Tests/PGPostgresResultTests.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ - (void)testResultDescriptionIsCorrect
6363
"}");
6464

6565
// Compare the output after getting rid of newlines and spaces
66-
STAssertTrue([[[[_result description] stringByReplacingOccurrencesOfString:@"\n" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""] isEqualToString:@"{"
66+
XCTAssertTrue([[[[_result description] stringByReplacingOccurrencesOfString:@"\n" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""] isEqualToString:@"{"
6767
"\"bigint_field\" = 123456789;"
6868
"\"bool_field\" = 1;"
6969
"\"char_field\" = CHAR;"
@@ -77,7 +77,7 @@ - (void)testResultDescriptionIsCorrect
7777
"\"timestamptz_field\" = \"8 Apr 1987 03:02:02 GMT+01:00\";"
7878
"\"timetz_field\" = \"02:02:02 GMT+10:00\";"
7979
"\"varchar_field\" = VARCHAR;"
80-
"}"], nil);
80+
"}"]);
8181
}
8282

8383
#pragma mark -

0 commit comments

Comments
 (0)