Show
Ignore:
Timestamp:
09/16/09 17:09:31 (3 years ago)
Author:
leo
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • XerialJ/trunk/sqlite-jdbc/src/test/java/org/sqlite/SQLitePureJavaTest.java

    r3274 r3592  
    2828 
    2929    @Before 
    30     public void setUp() throws Exception 
    31     { 
     30    public void setUp() throws Exception { 
    3231        System.setProperty("sqlite.purejava", "true"); 
    3332        connection = null; 
     
    3837 
    3938    @After 
    40     public void tearDown() throws Exception 
    41     { 
     39    public void tearDown() throws Exception { 
    4240        if (connection != null) 
    4341            connection.close(); 
     42 
     43        System.setProperty("sqlite.purejava", "false"); 
    4444    } 
    4545 
    4646    @Test 
    47     public void query() throws ClassNotFoundException 
    48     { 
     47    public void query() throws ClassNotFoundException { 
    4948        //_logger.debug(String.format("running in %s mode", SQLiteJDBCLoader.isNativeMode() ? "native" : "nested")); 
    5049 
    5150        assertTrue(SQLiteJDBCLoader.isNativeMode() == false); 
    5251 
    53         try 
    54         { 
     52        try { 
    5553            Statement statement = connection.createStatement(); 
    5654            statement.setQueryTimeout(30); // set timeout to 30 sec. 
     
    6159 
    6260            ResultSet rs = statement.executeQuery("select * from person order by id"); 
    63             while (rs.next()) 
    64             { 
     61            while (rs.next()) { 
    6562                // read the result set 
    6663                int id = rs.getInt(1); 
     
    6865            } 
    6966        } 
    70         catch (SQLException e) 
    71         { 
     67        catch (SQLException e) { 
    7268            // if e.getMessage() is "out of memory", it probably means no 
    7369            // database file is found 
     
    7773 
    7874    @Test 
    79     public void function() throws SQLException 
    80     { 
     75    public void function() throws SQLException { 
    8176        assertTrue(SQLiteJDBCLoader.isNativeMode() == false); 
    8277 
    8378        Function.create(connection, "total", new Function() { 
    8479            @Override 
    85             protected void xFunc() throws SQLException 
    86             { 
     80            protected void xFunc() throws SQLException { 
    8781                int sum = 0; 
    8882                for (int i = 0; i < args(); i++)