Skip to content

Commit 901d010

Browse files
committed
Restore the test that strict tables won't accept ill-typed values.
1 parent 3c4ff5b commit 901d010

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/GRDBTests/TableDefinitionTests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ class TableDefinitionTests: GRDBTestCase {
7676
"e" ANY\
7777
) STRICT
7878
""")
79+
80+
do {
81+
try db.execute(sql: "INSERT INTO test3 (id, a) VALUES (1, 'foo')")
82+
XCTFail("Expected DatabaseError.SQLITE_CONSTRAINT_DATATYPE")
83+
} catch DatabaseError.SQLITE_CONSTRAINT_DATATYPE {
84+
}
7985
}
8086
}
8187

0 commit comments

Comments
 (0)