Skip to content

Commit 56d3a65

Browse files
committed
Clear out trace
1 parent e9d93b5 commit 56d3a65

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Tests/SQLiteTests/ConnectionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class ConnectionTests : SQLiteTestCase {
157157

158158
func test_transaction_rollsBackTransactionsIfCommitsFail() {
159159
// This test case needs to emulate an environment where the individual statements succeed, but committing the
160-
// transactuin fails. Using deferred foreign keys is one option to achieve this.
160+
// transaction fails. Using deferred foreign keys is one option to achieve this.
161161
try! db.execute("PRAGMA foreign_keys = ON;")
162162
try! db.execute("PRAGMA defer_foreign_keys = ON;")
163163
let stmt = try! db.prepare("INSERT INTO users (email, manager_id) VALUES (?, ?)", "alice@example.com", 100)

Tests/SQLiteTests/TestHelpers.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import XCTest
22
@testable import SQLite
33

44
class SQLiteTestCase : XCTestCase {
5-
6-
var trace = [String: Int]()
7-
8-
let db = try! Connection()
9-
5+
private var trace:[String: Int]!
106
let users = Table("users")
7+
let db = try! Connection()
118

129
override func setUp() {
1310
super.setUp()
11+
trace = [String:Int]()
1412

1513
db.trace { SQL in
1614
print(SQL)

0 commit comments

Comments
 (0)