aboutsummaryrefslogtreecommitdiff
path: root/Foundation
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan <dmaclach@gmail.com>2018-11-08 09:52:46 -0800
committerGravatar Thomas Van Lenten <thomasvl@google.com>2018-11-08 15:43:44 -0500
commit01b882dad6f7668ed0387147952b63399f97cf19 (patch)
tree4b231f0a39aa6e4a7890a25486b01eff744ecc1a /Foundation
parentfeecd760fec7c740514d582f8da87ae60eb369d4 (diff)
Fix up some broken tests.
- Set up stack trace test just so we make sure we don't recurse. Right now it is too tight and breaks on every system release. - SQLite's behavior is actually undefined in the case of sqlite3_errcode, so don't depend on it in a test.
Diffstat (limited to 'Foundation')
-rw-r--r--Foundation/GTMSQLiteTest.m3
-rw-r--r--Foundation/GTMStackTraceTest.m8
2 files changed, 4 insertions, 7 deletions
diff --git a/Foundation/GTMSQLiteTest.m b/Foundation/GTMSQLiteTest.m
index 2537dd6..adf687c 100644
--- a/Foundation/GTMSQLiteTest.m
+++ b/Foundation/GTMSQLiteTest.m
@@ -629,9 +629,6 @@ static void TestUpperLower16Impl(sqlite3_context *context,
XCTAssertEqual(err, [db lastErrorCode],
@"lastErrorCode API did not match what last API returned!");
- // Calling lastErrorCode resets API error, so the next string will not indicate any error
- XCTAssertEqualStrings(@"unknown error", [db lastErrorString],
- @"lastErrorString API did not match expected string!");
oneRow = [statement resultStringAtPosition:0];
XCTAssertEqualStrings(oneRow, @"a2", @"a did not come second!");
diff --git a/Foundation/GTMStackTraceTest.m b/Foundation/GTMStackTraceTest.m
index 956385b..bc15300 100644
--- a/Foundation/GTMStackTraceTest.m
+++ b/Foundation/GTMStackTraceTest.m
@@ -38,8 +38,8 @@
XCTAssertGreaterThan([stacklines count], (NSUInteger)3,
@"stack trace must have > 3 lines");
- XCTAssertLessThan([stacklines count], (NSUInteger)37,
- @"stack trace must have < 37 lines");
+ XCTAssertLessThan([stacklines count], (NSUInteger)100,
+ @"stack trace must have < 100 lines");
NSString *firstFrame = [stacklines objectAtIndex:0];
NSRange range = [firstFrame rangeOfString:@"testStackTraceBasic"];
@@ -103,8 +103,8 @@
XCTAssertGreaterThan([stacklines count], (NSUInteger)4,
@"stack trace must have > 4 lines\n%@", stacktrace);
- XCTAssertLessThan([stacklines count], (NSUInteger)41,
- @"stack trace must have < 41 lines\n%@", stacktrace);
+ XCTAssertLessThan([stacklines count], (NSUInteger)100,
+ @"stack trace must have < 100 lines\n%@", stacktrace);
XCTAssertEqual([stacklines count],
[[exception callStackReturnAddresses] count],
@"stack trace should have the same number of lines as the "