Package org.tmatesoft.sqljet.core.internal

Examples of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryBuffer


        memoryManager.free(b);
    }

    @Test
    public void testUnsignedShortBuffer() {
        ISqlJetMemoryBuffer b = memoryManager.allocate(ISqlJetMemoryManager.SHORT_SIZE, SqlJetMemoryBufferType.BUFFER);
        b.putShortUnsigned(0, 0xFFFF);
        Assert.assertEquals(0xFFFF, b.getShortUnsigned(0));
        b.putShortUnsigned(0, (short) 1);
        Assert.assertEquals(1, b.getShortUnsigned(0));
        Assert.assertEquals(1, b.getShort(0));
        b.putShort(0, (short) 1);
        Assert.assertEquals(1, b.getShortUnsigned(0));
        Assert.assertEquals(1, b.getShort(0));
        memoryManager.free(b);
    }
View Full Code Here


        memoryManager.free(b);
    }

    @Test
    public void testIntBuffer() {
        ISqlJetMemoryBuffer b = memoryManager.allocate(ISqlJetMemoryManager.INT_SIZE, SqlJetMemoryBufferType.BUFFER);
        b.putInt(0, 1);
        Assert.assertEquals(1, b.getInt(0));
        b.putInt(0, -1);
        Assert.assertEquals(-1, b.getInt(0));
        b.putInt(0, Integer.MAX_VALUE);
        Assert.assertEquals(Integer.MAX_VALUE, b.getInt(0));
        b.putInt(0, Integer.MIN_VALUE);
        Assert.assertEquals(Integer.MIN_VALUE, b.getInt(0));
        memoryManager.free(b);
    }
View Full Code Here

        memoryManager.free(b);
    }

    @Test
    public void testUnsignedIntBuffer() {
        ISqlJetMemoryBuffer b = memoryManager.allocate(ISqlJetMemoryManager.INT_SIZE, SqlJetMemoryBufferType.BUFFER);
        b.putIntUnsigned(0, 0xFFFFFFFFL);
        Assert.assertEquals(0xFFFFFFFFL, b.getIntUnsigned(0));
        b.putIntUnsigned(0, 1);
        Assert.assertEquals(1, b.getIntUnsigned(0));
        Assert.assertEquals(1, b.getInt(0));
        b.putInt(0, 1);
        Assert.assertEquals(1, b.getIntUnsigned(0));
        Assert.assertEquals(1, b.getInt(0));
        memoryManager.free(b);
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.sqljet.core.internal.ISqlJetMemoryBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.