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:
@ -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(){
|
||||
|
@ -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." );
|
||||
|
Reference in New Issue
Block a user