mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add an assert() and five testcase() macros to the OP_Cast opcode implementation
to help verify that it is fully tested. FossilOrigin-Name: af364cce9da0961593ef876b646197f82df08ad5
This commit is contained in:
@@ -1783,6 +1783,12 @@ case OP_RealAffinity: { /* in1 */
|
||||
** A NULL value is not changed by this routine. It remains NULL.
|
||||
*/
|
||||
case OP_Cast: { /* in1 */
|
||||
assert( pOp->p2>=SQLITE_AFF_TEXT && pOp->p2<=SQLITE_AFF_REAL );
|
||||
testcase( pOp->p2==SQLITE_AFF_TEXT );
|
||||
testcase( pOp->p2==SQLITE_AFF_NONE );
|
||||
testcase( pOp->p2==SQLITE_AFF_NUMERIC );
|
||||
testcase( pOp->p2==SQLITE_AFF_INTEGER );
|
||||
testcase( pOp->p2==SQLITE_AFF_REAL );
|
||||
pIn1 = &aMem[pOp->p1];
|
||||
memAboutToChange(p, pIn1);
|
||||
rc = ExpandBlob(pIn1);
|
||||
|
Reference in New Issue
Block a user