mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-24 22:48:23 -05:00
tests: Activate more parser tests
Now that we have parser support for named constraints we can activate a couple more tests.
This commit is contained in:
@@ -573,21 +573,21 @@ void TestTable::parseTest_data()
|
||||
QTest::newRow("11") << std::string("CREATE TABLE t1(c1 text PRIMARY KEY DESC)");
|
||||
QTest::newRow("12") << std::string("CREATE TABLE t1(c1 text CONSTRAINT cons PRIMARY KEY DESC)");
|
||||
QTest::newRow("13") << std::string("CREATE TABLE t1(c1 text NOT NULL)");
|
||||
// TODO Requires named column constraint: QTest::newRow("14") << std::string("CREATE TABLE t1(c1 text CONSTRAINT nm NOT NULL)");
|
||||
QTest::newRow("14") << std::string("CREATE TABLE t1(c1 text CONSTRAINT nm NOT NULL)");
|
||||
QTest::newRow("15") << std::string("CREATE TABLE t1(c1 text NULL)");
|
||||
QTest::newRow("16") << std::string("CREATE TABLE t1(c1 text CONSTRAINT nm NULL)");
|
||||
QTest::newRow("17") << std::string("CREATE TABLE t1(c1 text UNIQUE)");
|
||||
// TODO Requires named column constraint: QTest::newRow("18") << std::string("CREATE TABLE t1(c1 text CONSTRAINT un UNIQUE)");
|
||||
QTest::newRow("18") << std::string("CREATE TABLE t1(c1 text CONSTRAINT un UNIQUE)");
|
||||
QTest::newRow("19") << std::string("CREATE TABLE t1(c1 text CHECK(c1!=0))");
|
||||
// TODO Requires named column constraint: QTest::newRow("20") << std::string("CREATE TABLE t1(c1 text CONSTRAINT chk CHECK(c1!=0))");
|
||||
QTest::newRow("20") << std::string("CREATE TABLE t1(c1 text CONSTRAINT chk CHECK(c1!=0))");
|
||||
QTest::newRow("21") << std::string("CREATE TABLE t1(c1 text DEFAULT 1)");
|
||||
QTest::newRow("22") << std::string("CREATE TABLE t1(c1 text DEFAULT -1)");
|
||||
QTest::newRow("23") << std::string("CREATE TABLE t1(c1 text DEFAULT +1)");
|
||||
QTest::newRow("24") << std::string("CREATE TABLE t1(c1 text DEFAULT -45.8e22)");
|
||||
QTest::newRow("25") << std::string("CREATE TABLE t1(c1 text DEFAULT (1+1))");
|
||||
// TODO Requires named column constraint: QTest::newRow("26") << std::string("CREATE TABLE t1(c1 text CONSTRAINT \"1 2\" DEFAULT (1+1))");
|
||||
QTest::newRow("26") << std::string("CREATE TABLE t1(c1 text CONSTRAINT \"1 2\" DEFAULT (1+1))");
|
||||
QTest::newRow("27") << std::string("CREATE TABLE t1(c1 text COLLATE nocase)");
|
||||
// TODO Requires named column constraint: QTest::newRow("28") << std::string("CREATE TABLE t1(c1 text CONSTRAINT 'a x' COLLATE nocase)");
|
||||
QTest::newRow("28") << std::string("CREATE TABLE t1(c1 text CONSTRAINT 'a x' COLLATE nocase)");
|
||||
QTest::newRow("29") << std::string("CREATE TABLE t1(c1 REFERENCES t2)");
|
||||
QTest::newRow("30") << std::string("CREATE TABLE t1(c1 CONSTRAINT abc REFERENCES t2)");
|
||||
QTest::newRow("31") << std::string("CREATE TABLE t1(c1 PRIMARY KEY NOT NULL UNIQUE CHECK(c1 IS 'ten') DEFAULT 123 REFERENCES t1);");
|
||||
@@ -736,11 +736,11 @@ void TestTable::parseTest_data()
|
||||
QTest::newRow("174") << std::string("CREATE TABLE t1_fa(a PRIMARY KEY ON CONFLICT FAIL, b);");
|
||||
QTest::newRow("175") << std::string("CREATE TABLE t1_re(a PRIMARY KEY ON CONFLICT REPLACE, b);");
|
||||
QTest::newRow("176") << std::string("CREATE TABLE t1_xx(a PRIMARY KEY, b);");
|
||||
// TODO Requires NOT NULL conflict actions: QTest::newRow("177") << std::string("CREATE TABLE t2_ab(a, b NOT NULL ON CONFLICT ABORT);");
|
||||
// TODO Requires NOT NULL conflict actions: QTest::newRow("178") << std::string("CREATE TABLE t2_ro(a, b NOT NULL ON CONFLICT ROLLBACK);");
|
||||
// TODO Requires NOT NULL conflict actions: QTest::newRow("179") << std::string("CREATE TABLE t2_ig(a, b NOT NULL ON CONFLICT IGNORE);");
|
||||
// TODO Requires NOT NULL conflict actions: QTest::newRow("180") << std::string("CREATE TABLE t2_fa(a, b NOT NULL ON CONFLICT FAIL);");
|
||||
// TODO Requires NOT NULL conflict actions: QTest::newRow("181") << std::string("CREATE TABLE t2_re(a, b NOT NULL ON CONFLICT REPLACE);");
|
||||
QTest::newRow("177") << std::string("CREATE TABLE t2_ab(a, b NOT NULL ON CONFLICT ABORT);");
|
||||
QTest::newRow("178") << std::string("CREATE TABLE t2_ro(a, b NOT NULL ON CONFLICT ROLLBACK);");
|
||||
QTest::newRow("179") << std::string("CREATE TABLE t2_ig(a, b NOT NULL ON CONFLICT IGNORE);");
|
||||
QTest::newRow("180") << std::string("CREATE TABLE t2_fa(a, b NOT NULL ON CONFLICT FAIL);");
|
||||
QTest::newRow("181") << std::string("CREATE TABLE t2_re(a, b NOT NULL ON CONFLICT REPLACE);");
|
||||
QTest::newRow("182") << std::string("CREATE TABLE t2_xx(a, b NOT NULL);");
|
||||
QTest::newRow("183") << std::string("CREATE TABLE t3_ab(a, b, UNIQUE(a, b) ON CONFLICT ABORT);");
|
||||
QTest::newRow("184") << std::string("CREATE TABLE t3_ro(a, b, UNIQUE(a, b) ON CONFLICT ROLLBACK);");
|
||||
|
||||
Reference in New Issue
Block a user