aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Tests
diff options
context:
space:
mode:
authorMarius Ursache <marius@marius.me.uk>2016-03-01 10:45:24 +1100
committerMarius Ursache <marius@marius.me.uk>2016-03-01 10:45:24 +1100
commit7887ad6932b02ca149520b1624608504da3494bf (patch)
treea54f467dee09e47a56dd58681d0a216d4b4514e3 /Frameworks/PostgresKit/Tests
parent8a4bc2f3a38da7cea67c4cc5e8bb85fa2c5c2d07 (diff)
downloadsequelpro-7887ad6932b02ca149520b1624608504da3494bf.tar.gz
sequelpro-7887ad6932b02ca149520b1624608504da3494bf.tar.bz2
sequelpro-7887ad6932b02ca149520b1624608504da3494bf.zip
Converted PostgresKit tests to XCTest
Diffstat (limited to 'Frameworks/PostgresKit/Tests')
-rw-r--r--Frameworks/PostgresKit/Tests/PGDataTypeTests.h2
-rw-r--r--Frameworks/PostgresKit/Tests/PGDataTypeTests.m12
-rw-r--r--Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h4
-rw-r--r--Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m2
-rw-r--r--Frameworks/PostgresKit/Tests/PGPostgresResultTests.h2
-rw-r--r--Frameworks/PostgresKit/Tests/PGPostgresResultTests.m4
6 files changed, 13 insertions, 13 deletions
diff --git a/Frameworks/PostgresKit/Tests/PGDataTypeTests.h b/Frameworks/PostgresKit/Tests/PGDataTypeTests.h
index 8f6b54ad..7322823f 100644
--- a/Frameworks/PostgresKit/Tests/PGDataTypeTests.h
+++ b/Frameworks/PostgresKit/Tests/PGDataTypeTests.h
@@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#import <PostgresKit/PostgresKit.h>
-#import <SenTestingKit/SenTestingKit.h>
+#import <XCTest/XCTest.h>
#import "PGPostgresIntegrationTestCase.h"
diff --git a/Frameworks/PostgresKit/Tests/PGDataTypeTests.m b/Frameworks/PostgresKit/Tests/PGDataTypeTests.m
index a2048ed6..8ffd8b47 100644
--- a/Frameworks/PostgresKit/Tests/PGDataTypeTests.m
+++ b/Frameworks/PostgresKit/Tests/PGDataTypeTests.m
@@ -33,7 +33,7 @@
+ (void)_addTestForField:(NSString *)field
withExpectedResult:(id)result
connection:(PGPostgresConnection *)connection
- toTestSuite:(SenTestSuite *)testSuite;
+ toTestSuite:(XCTestSuite *)testSuite;
@end
@@ -48,7 +48,7 @@
+ (id)defaultTestSuite
{
- SenTestSuite *testSuite = [[SenTestSuite alloc] initWithName:[self className]];
+ XCTestSuite *testSuite = [[XCTestSuite alloc] initWithName:[self className]];
PGPostgresConnection *connection = [[PGPostgresConnection alloc] init];
@@ -109,12 +109,12 @@
- (void)testResultValueIsNotNil
{
- STAssertNotNil(_result, nil);
+ XCTAssertNotNil(_result);
}
- (void)testResultIsOfCorrectTypeAndValue
{
- STAssertEqualObjects(_result, _expectedResult, nil);
+ XCTAssertEqualObjects(_result, _expectedResult);
}
#pragma mark -
@@ -123,11 +123,11 @@
+ (void)_addTestForField:(NSString *)field
withExpectedResult:(id)result
connection:(PGPostgresConnection *)connection
- toTestSuite:(SenTestSuite *)testSuite
+ toTestSuite:(XCTestSuite *)testSuite
{
for (NSInvocation *invocation in [self testInvocations])
{
- SenTestCase *test = [[[self class] alloc] initWithInvocation:invocation connection:connection expectedResult:result field:field];
+ XCTestCase *test = [[[self class] alloc] initWithInvocation:invocation connection:connection expectedResult:result field:field];
[testSuite addTest:test];
diff --git a/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h b/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h
index c6706156..7a654f5f 100644
--- a/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h
+++ b/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.h
@@ -27,9 +27,9 @@
// OTHER DEALINGS IN THE SOFTWARE.
#import <PostgresKit/PostgresKit.h>
-#import <SenTestingKit/SenTestingKit.h>
+#import <XCTest/XCTest.h>
-@interface PGPostgresIntegrationTestCase : SenTestCase
+@interface PGPostgresIntegrationTestCase : XCTestCase
{
PGPostgresConnection *_connection;
}
diff --git a/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m b/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m
index e6c96505..96de8a40 100644
--- a/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m
+++ b/Frameworks/PostgresKit/Tests/PGPostgresIntegrationTestCase.m
@@ -67,7 +67,7 @@ static NSUInteger PGTestDatabasePort = 5432;
[_connection setPassword:PGTestDatabasePassword];
if (![_connection connect]) {
- STFail(@"Request to establish connection to local database failed.");
+ XCTFail(@"Request to establish connection to local database failed.");
exit(1);
}
diff --git a/Frameworks/PostgresKit/Tests/PGPostgresResultTests.h b/Frameworks/PostgresKit/Tests/PGPostgresResultTests.h
index 93c36427..e01aedec 100644
--- a/Frameworks/PostgresKit/Tests/PGPostgresResultTests.h
+++ b/Frameworks/PostgresKit/Tests/PGPostgresResultTests.h
@@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#import <PostgresKit/PostgresKit.h>
-#import <SenTestingKit/SenTestingKit.h>
+#import <XCTest/XCTest.h>
#import "PGPostgresIntegrationTestCase.h"
diff --git a/Frameworks/PostgresKit/Tests/PGPostgresResultTests.m b/Frameworks/PostgresKit/Tests/PGPostgresResultTests.m
index ef64ea53..8e27b163 100644
--- a/Frameworks/PostgresKit/Tests/PGPostgresResultTests.m
+++ b/Frameworks/PostgresKit/Tests/PGPostgresResultTests.m
@@ -63,7 +63,7 @@
"}");
// Compare the output after getting rid of newlines and spaces
- STAssertTrue([[[[_result description] stringByReplacingOccurrencesOfString:@"\n" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""] isEqualToString:@"{"
+ XCTAssertTrue([[[[_result description] stringByReplacingOccurrencesOfString:@"\n" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""] isEqualToString:@"{"
"\"bigint_field\" = 123456789;"
"\"bool_field\" = 1;"
"\"char_field\" = CHAR;"
@@ -77,7 +77,7 @@
"\"timestamptz_field\" = \"8 Apr 1987 03:02:02 GMT+01:00\";"
"\"timetz_field\" = \"02:02:02 GMT+10:00\";"
"\"varchar_field\" = VARCHAR;"
- "}"], nil);
+ "}"]);
}
#pragma mark -