/ Check-in [9b18dfd1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed numbering of a few tests; minor tweaks on others; added a couple new tests to stress previous simplifications to compile-time option reporting functions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9b18dfd19e825b09c1d246c826e179b9892308df
User & Date: shaneh 2010-02-25 16:09:15
Original Comment: Fixed numbering of a few tests; minor tweaks on others. Added a couple new tests to stress previous simplifications.
Original User & Date: shaneh 2010-02-25 18:07:59
Context
2010-02-25
19:09
Add experimental fix for corruption detection problem. This may well be revised yet. check-in: 1cc4be7e user: dan tags: trunk
16:09
Fixed numbering of a few tests; minor tweaks on others; added a couple new tests to stress previous simplifications to compile-time option reporting functions. check-in: 9b18dfd1 user: shaneh tags: trunk
15:28
Minor simplifications to the compile-time option reporting functions and pragmas to facilitate coverage testing. check-in: 633d8747 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/ctime.test.

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
137
138
139
140
...
165
166
167
168
169
170
171















172
173
174
175
176
177
178
...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
} {0 1}
do_test ctime-1.4.5 {
  catchsql {
    PRAGMA compile_option="THREADSAFE";
  }
} {0 1}

do_test ctime-1.4 {
  set ans1 [ catchsql {
    PRAGMA compile_option('THREADSAFE=0');
  } ]
  set ans2 [ catchsql {
    PRAGMA compile_option('THREADSAFE=1');
  } ]
  lsort [ list $ans1 $ans2 ]
} {{0 0} {0 1}}

do_test ctime-1.5 {
  execsql {
    PRAGMA compile_option('THREADSAFE=');
  }
} {0}

do_test ctime-1.6 {
  execsql {
    PRAGMA compile_option('SQLITE_OMIT_COMPILEOPTION_DIAGS');
  }
} {0}
do_test ctime-1.7 {
  execsql {
    PRAGMA compile_option('OMIT_COMPILEOPTION_DIAGS');
  }
} {0}

#####################
# ctime-2.*: Test function support.
................................................................................
  }
} {1 {no such column: foo}}
do_test ctime-2.1.6 {
  catchsql {
    SELECT sqlite_compile_option_used('THREADSAFE', 0);
  }
} {1 {wrong number of arguments to function sqlite_compile_option_used()}}
















do_test ctime-2.2.1 {
  catchsql {
    SELECT sqlite_compile_option_get();
  }
} {1 {wrong number of arguments to function sqlite_compile_option_get()}}
do_test ctime-2.2.2 {
................................................................................
    SELECT sqlite_compile_option_used(sqlite_compile_option_get(0));
  }
} {0 1}

# This assumes there is at least 1 compile time option
# (see SQLITE_THREADSAFE above).
do_test ctime-2.4 {
  set res [ catchsql {
    SELECT sqlite_compile_option_get(0);
  } ]
  list [lindex $res 0]
} {0}

# Get the list of defines using the pragma,
# then try querying each one with the functions.
set ans [ catchsql {
  PRAGMA compile_options;
} ]







|









|




>
|




|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|


|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
...
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
} {0 1}
do_test ctime-1.4.5 {
  catchsql {
    PRAGMA compile_option="THREADSAFE";
  }
} {0 1}

do_test ctime-1.5 {
  set ans1 [ catchsql {
    PRAGMA compile_option('THREADSAFE=0');
  } ]
  set ans2 [ catchsql {
    PRAGMA compile_option('THREADSAFE=1');
  } ]
  lsort [ list $ans1 $ans2 ]
} {{0 0} {0 1}}

do_test ctime-1.6 {
  execsql {
    PRAGMA compile_option('THREADSAFE=');
  }
} {0}

do_test ctime-1.7.1 {
  execsql {
    PRAGMA compile_option('SQLITE_OMIT_COMPILEOPTION_DIAGS');
  }
} {0}
do_test ctime-1.7.2 {
  execsql {
    PRAGMA compile_option('OMIT_COMPILEOPTION_DIAGS');
  }
} {0}

#####################
# ctime-2.*: Test function support.
................................................................................
  }
} {1 {no such column: foo}}
do_test ctime-2.1.6 {
  catchsql {
    SELECT sqlite_compile_option_used('THREADSAFE', 0);
  }
} {1 {wrong number of arguments to function sqlite_compile_option_used()}}
do_test ctime-2.1.7 {
  catchsql {
    SELECT sqlite_compile_option_used(0);
  }
} {0 0}
do_test ctime-2.1.8 {
  catchsql {
    SELECT sqlite_compile_option_used('0');
  }
} {0 0}
do_test ctime-2.1.9 {
  catchsql {
    SELECT sqlite_compile_option_used(1.0);
  }
} {0 0}

do_test ctime-2.2.1 {
  catchsql {
    SELECT sqlite_compile_option_get();
  }
} {1 {wrong number of arguments to function sqlite_compile_option_get()}}
do_test ctime-2.2.2 {
................................................................................
    SELECT sqlite_compile_option_used(sqlite_compile_option_get(0));
  }
} {0 1}

# This assumes there is at least 1 compile time option
# (see SQLITE_THREADSAFE above).
do_test ctime-2.4 {
  set ans [ catchsql {
    SELECT sqlite_compile_option_get(0);
  } ]
  list [lindex $ans 0]
} {0}

# Get the list of defines using the pragma,
# then try querying each one with the functions.
set ans [ catchsql {
  PRAGMA compile_options;
} ]