mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Represent booleans with a single byte.
This commit is contained in:
@@ -37,7 +37,7 @@ public class ReaderImplTest extends BriarTestCase {
|
||||
|
||||
@Test
|
||||
public void testReadBoolean() throws Exception {
|
||||
setContents("11" + "00" + "11" + "01");
|
||||
setContents("10" + "11");
|
||||
assertFalse(r.readBoolean());
|
||||
assertTrue(r.readBoolean());
|
||||
assertTrue(r.eof());
|
||||
@@ -45,7 +45,7 @@ public class ReaderImplTest extends BriarTestCase {
|
||||
|
||||
@Test
|
||||
public void testSkipBoolean() throws Exception {
|
||||
setContents("11" + "00" + "11" + "01");
|
||||
setContents("10" + "11");
|
||||
r.skipBoolean();
|
||||
r.skipBoolean();
|
||||
assertTrue(r.eof());
|
||||
|
||||
@@ -36,8 +36,8 @@ public class WriterImplTest extends BriarTestCase {
|
||||
public void testWriteBoolean() throws IOException {
|
||||
w.writeBoolean(true);
|
||||
w.writeBoolean(false);
|
||||
// BOOLEAN tag, 1, BOOLEAN tag, 0
|
||||
checkContents("11" + "01" + "11" + "00");
|
||||
// TRUE tag, FALSE tag
|
||||
checkContents("11" + "10");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user