1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Start adding tests for the second JNI layer.

FossilOrigin-Name: 0177f4dfe8a5c03c1d5dd279c6babe5a87b596c2351373f845b89fc6abf7947b
This commit is contained in:
stephan
2023-10-10 12:16:04 +00:00
parent aaf1341dcd
commit 0b29d37ef9
5 changed files with 19 additions and 12 deletions

View File

@ -50,7 +50,7 @@ public final class Sqlite implements AutoCloseable {
}
public static Sqlite open(String filename){
return open(filename, 0, null);
return open(filename, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, null);
}
@Override public void close(){

View File

@ -126,6 +126,13 @@ public class Tester2 implements Runnable {
}
}
void testOpenDb1(){
Sqlite db = Sqlite.open(":memory:");
affirm( 0!=db.dbHandle().getNativePointer() );
db.close();
affirm( null==db.dbHandle() );
}
@ManualTest /* because we only want to run this test on demand */
private void testFail(){
affirm( false, "Intentional failure." );