Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/src/test_vdbecov.c # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / src / test_vdbecov.c` 116 lines ยท 2907 bytes Raw Blame History 1 /* 2 ** 2019 April 02 3 ** 4 ** The author disclaims copyright to this source code. In place of 5 ** a legal notice, here is a blessing: 6 ** 7 ** May you do good and not evil. 8 ** May you find forgiveness for yourself and forgive others. 9 ** May you share freely, never taking more than you give. 10 ** 11 ****************************************************************************** 12 ** 13 */ 14 #if SQLITE_TEST /* This file is used for testing only */ 15 16 #include "sqlite3.h" 17 #include "sqliteInt.h" 18 #include "tclsqlite.h" 19 20 #ifdef SQLITE_VDBE_COVERAGE 21 22 static u8 aBranchArray[200000]; 23 24 static void test_vdbe_branch( 25 void *pCtx, 26 unsigned int iSrc, 27 unsigned char iBranch, 28 unsigned char iType 29 ){ 30 if( iSrc> 4)==4); 82 if( b ){ 83 if( (b & 0x01)==0 ){ 84 appendToList(pRes, i, 0, bFlag ? "less than" : "falls through"); 85 } 86 if( (b & 0x02)==0 ){ 87 appendToList(pRes, i, 1, bFlag ? "equal" : "taken"); 88 } 89 if( (b & 0x04)==0 ){ 90 appendToList(pRes, i, 2, bFlag ? "greater-than" : "NULL"); 91 } 92 } 93 } 94 Tcl_SetObjResult(interp, pRes); 95 Tcl_DecrRefCount(pRes); 96 break; 97 }; 98 99 default: /* stop */ 100 sqlite3_test_control(SQLITE_TESTCTRL_VDBE_COVERAGE, 0, 0); 101 break; 102 } 103 104 return TCL_OK; 105 } 106 107 #endif /* SQLITE_VDBE_COVERAGE */ 108 109 int Sqlitetestvdbecov_Init(Tcl_Interp *interp){ 110 #ifdef SQLITE_VDBE_COVERAGE 111 Tcl_CreateObjCommand(interp, "vdbe_coverage", test_vdbe_coverage, 0, 0); 112 #endif 113 return TCL_OK; 114 } 115 116 #endif