MCPcopy Create free account
hub / github.com/anse1/sqlsmith / test

Method test

sqlite.cc:274–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void dut_sqlite::test(const std::string &stmt)
275{
276 alarm(6);
277 rc = sqlite3_exec(db, stmt.c_str(), dut_callback, 0, &zErrMsg);
278 if( rc!=SQLITE_OK ){
279 try {
280 if (regex_match(zErrMsg, e_syntax))
281 throw dut::syntax(zErrMsg);
282 else if (regex_match(zErrMsg, e_user_abort)) {
283 sqlite3_free(zErrMsg);
284 return;
285 } else
286 throw dut::failure(zErrMsg);
287 } catch (dut::failure &e) {
288 sqlite3_free(zErrMsg);
289 throw;
290 }
291 }
292}
293

Callers 1

mainFunction · 0.45

Calls 2

syntaxClass · 0.85
failureClass · 0.85

Tested by

no test coverage detected