Closed AMilassin closed 12 years ago
Using the writeBoolean() and readBoolean() helper methods to transfer a boolean value makes the actual value to flip in the process.
sample JUnit test:
@Test public void test_boolean() throws Exception { String testPath = "temp" + File.separator + "chroncle-bool-test"; IndexedChronicle tsc = new IndexedChronicle(testPath, 12); tsc.useUnsafe(false); deleteOnExit(testPath); tsc.clear(); Excerpt<IndexedChronicle> excerpt = tsc.createExcerpt(); excerpt.startExcerpt(2); excerpt.writeBoolean(false); excerpt.writeBoolean(true); excerpt.finish(); excerpt.index(0); boolean one = excerpt.readBoolean(); boolean onetwo = excerpt.readBoolean(); tsc.close(); Assert.assertEquals(false, one); Assert.assertEquals(true, onetwo); }
Fixed now. Thank you very much for the unit test.
Using the writeBoolean() and readBoolean() helper methods to transfer a boolean value makes the actual value to flip in the process.
sample JUnit test: