From 901d010ab37108923d8172abccef059dd274349a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Thu, 20 Oct 2022 08:34:09 +0200 Subject: [PATCH] Restore the test that strict tables won't accept ill-typed values. --- Tests/GRDBTests/TableDefinitionTests.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/GRDBTests/TableDefinitionTests.swift b/Tests/GRDBTests/TableDefinitionTests.swift index a63deb9a2..e63c134d6 100644 --- a/Tests/GRDBTests/TableDefinitionTests.swift +++ b/Tests/GRDBTests/TableDefinitionTests.swift @@ -76,6 +76,12 @@ class TableDefinitionTests: GRDBTestCase { "e" ANY\ ) STRICT """) + + do { + try db.execute(sql: "INSERT INTO test3 (id, a) VALUES (1, 'foo')") + XCTFail("Expected DatabaseError.SQLITE_CONSTRAINT_DATATYPE") + } catch DatabaseError.SQLITE_CONSTRAINT_DATATYPE { + } } }