Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fixes for malloc4.test. (CVS 4340) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
23746924db3c005d1f75572c6cbb91db |
User & Date: | danielk1977 2007-08-30 15:16:05.000 |
Context
2007-08-30
| ||
15:46 | Check in extra fixes for malloc4.test. (CVS 4341) (check-in: 49ce3a8381 user: danielk1977 tags: trunk) | |
15:16 | Fixes for malloc4.test. (CVS 4340) (check-in: 23746924db user: danielk1977 tags: trunk) | |
15:05 | Fix the SQLITE_MIXED_ENDIAN_64BIT_FLOAT option so that it works on goofy linux kernels that employ CONFIG_FPE_FASTFPE. Patch from Frank van Vugt. (CVS 4339) (check-in: 71ab92e900 user: drh tags: trunk) | |
Changes
Changes to test/malloc4.test.
︙ | ︙ | |||
8 9 10 11 12 13 14 | # May you share freely, never taking more than you give. # #*********************************************************************** # # This file contains tests to ensure that the library handles malloc() failures # correctly. The emphasis in this file is on sqlite3_column_XXX() APIs. # | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # May you share freely, never taking more than you give. # #*********************************************************************** # # This file contains tests to ensure that the library handles malloc() failures # correctly. The emphasis in this file is on sqlite3_column_XXX() APIs. # # $Id: malloc4.test,v 1.8 2007/08/30 15:16:05 danielk1977 Exp $ #--------------------------------------------------------------------------- # NOTES ON EXPECTED BEHAVIOUR # # [193] When a memory allocation failure occurs during sqlite3_column_name(), # sqlite3_column_name16(), sqlite3_column_decltype(), or # sqlite3_column_decltype16() the function shall return NULL. |
︙ | ︙ | |||
37 38 39 40 41 42 43 | finish_test return } proc do_stmt_test {id sql} { set ::sql $sql set go 1 | | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | finish_test return } proc do_stmt_test {id sql} { set ::sql $sql set go 1 for {set n 0} {$go} {incr n} { set testid "malloc4-$id.$n" # Prepare the statement do_test ${testid}.1 { set ::STMT [sqlite3_prepare $::DB $sql -1 TAIL] expr [string length $::STMT] > 0 } {1} # Set the Nth malloc() to fail. sqlite3_memdebug_fail $n -repeat 0 # Test malloc failure in the _name(), _name16(), decltype() and # decltype16() APIs. Calls that occur after the malloc() failure should # return NULL. No error is raised though. # # ${testid}.2.1 - Call _name() # ${testid}.2.2 - Call _name16() |
︙ | ︙ |