mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Add testcase() macros beside each sqlite3_log() call to make sure it is
tested with both logging enable and disabled. FossilOrigin-Name: 1168763d2cd96acfa0488198e8bc82f0c4fa35a3
This commit is contained in:
@@ -1956,15 +1956,18 @@ int sqlite3_get_autocommit(sqlite3 *db){
|
||||
** a low-level error is first detected.
|
||||
*/
|
||||
int sqlite3CorruptError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_CORRUPT,
|
||||
"database corruption found by source line %d", lineno);
|
||||
return SQLITE_CORRUPT;
|
||||
}
|
||||
int sqlite3MisuseError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_MISUSE, "misuse detected by source line %d", lineno);
|
||||
return SQLITE_MISUSE;
|
||||
}
|
||||
int sqlite3CantopenError(int lineno){
|
||||
testcase( sqlite3GlobalConfig.xLog!=0 );
|
||||
sqlite3_log(SQLITE_CANTOPEN, "cannot open file at source line %d", lineno);
|
||||
return SQLITE_CANTOPEN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user