1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add testcase() macros for coverage in date.c. (CVS 6209)

FossilOrigin-Name: 90b42eba8e02402c342e04236148bbd5e4d93eb8
This commit is contained in:
drh
2009-01-28 02:55:28 +00:00
parent 695f097075
commit 6711002c7b
3 changed files with 13 additions and 9 deletions

View File

@@ -16,7 +16,7 @@
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.100 2009/01/20 16:53:40 danielk1977 Exp $
** $Id: date.c,v 1.101 2009/01/28 02:55:29 drh Exp $
**
** SQLite processes all times and dates as Julian Day numbers. The
** dates and times are stored as the number of days since noon
@@ -886,6 +886,10 @@ static void strftimeFunc(
i++;
}
}
testcase( n==sizeof(zBuf)-1 );
testcase( n==sizeof(zBuf) );
testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH] );
if( n<sizeof(zBuf) ){
z = zBuf;
}else if( n>(u64)db->aLimit[SQLITE_LIMIT_LENGTH] ){