Package com.alibaba.fastjson.serializer

Examples of com.alibaba.fastjson.serializer.SerializeWriter.writeLong()


  public void test_0() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.append('A');
    writer.writeInt(156);
    Assert.assertEquals("A156", writer.toString());
    writer.writeLong(345);
    Assert.assertEquals("A156345", writer.toString());

  }

  public void test_1() throws Exception {
View Full Code Here


    Assert.assertEquals("-1,", writer.toString());
  }

  public void test_5() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.writeLong(-1L);
    Assert.assertEquals("-1", writer.toString());
  }

  public void test_6() throws Exception {
    SerializeWriter writer = new SerializeWriter();
View Full Code Here

        Assert.assertEquals(Integer.toString(Integer.MIN_VALUE), out.toString());
    }

    public void test_13_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeLong(Long.MIN_VALUE);
        Assert.assertEquals(Long.toString(Long.MIN_VALUE), out.toString());
    }

    public void test_14() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

        Assert.assertEquals(Integer.toString(Integer.MAX_VALUE), out.toString());
    }

    public void test_14_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeLong(Long.MAX_VALUE);
        Assert.assertEquals(Long.toString(Long.MAX_VALUE), out.toString());
    }

    public void test_15() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

       
        SerializeWriter writer = new SerializeWriter(out, 10);
        Assert.assertEquals(10, writer.getBufferLength());
       
        writer.write("abcde");
        writer.writeLong(12345678L);
        writer.close();
       
        String text = out.toString();
        Assert.assertEquals("abcde12345678", text);
    }
View Full Code Here

        Assert.assertEquals(Integer.toString(Integer.MIN_VALUE), out.toString());
    }

    public void test_13_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeLong(Long.MIN_VALUE);
        Assert.assertEquals(Long.toString(Long.MIN_VALUE), out.toString());
    }

    public void test_14() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

        Assert.assertEquals(Integer.toString(Integer.MAX_VALUE), out.toString());
    }

    public void test_14_long() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.writeLong(Long.MAX_VALUE);
        Assert.assertEquals(Long.toString(Long.MAX_VALUE), out.toString());
    }

    public void test_15() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
View Full Code Here

  public void test_0() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.append('A');
    writer.writeInt(156);
    Assert.assertEquals("A156", writer.toString());
    writer.writeLong(345);
    Assert.assertEquals("A156345", writer.toString());

  }

  public void test_1() throws Exception {
View Full Code Here

    Assert.assertEquals("-1,", writer.toString());
  }

  public void test_5() throws Exception {
    SerializeWriter writer = new SerializeWriter();
    writer.writeLong(-1L);
    Assert.assertEquals("-1", writer.toString());
  }

  public void test_6() throws Exception {
    SerializeWriter writer = new SerializeWriter();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.