I detailed the issue I am having here: http://stackoverflow.com/questions/38330348/continuous-error-21-library-routine-called-out-of-sequence I have since narrowed it down to a piece of code. This passes: ``` TEST_FIXTURE(DatabaseFixture, TryToCreateATable) { database db(test); CHECK(db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)")); } ``` But this fails (normally it is `REQUIRE CHECK(db)` but I removed it to make sure it isn't `REQUIRE` causing issues). ``` TEST_FIXTURE(DatabaseFixture, TryToCreateATable) { database db(test); CHECK(db); CHECK(db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)")); } ``` The db boolean check is ``` operator bool() const { return connected_; } ``` If you replace the `CHECK(db);` line with the following: ``` if (!db) std::cout << "Not connected! " << db.error() << std::endl; ``` It passes. You can see the bool operator is called by placing a `cout` in there just to acknowledge the call. While I initially thought it was Sqlite3 related it appears it is the boolean operator causing the issue.
Activity
grahamreeds commentedon Jul 13, 2016
One of the eagle eyed developers on SO points out it is related to #7
Take UnitTest::Check parameter by const reference