use of com.alibaba.fastjson.serializer.SerializeWriter in project fastjson by alibaba.
the class SerializeWriterTest_9 method test_error_5.
public void test_error_5() throws Exception {
SerializeWriter writer = new SerializeWriter(new StringWriter());
Exception error = null;
try {
writer.toBytes("UTF-8");
} catch (Exception ex) {
error = ex;
}
Assert.assertNotNull(error);
writer.close();
}
use of com.alibaba.fastjson.serializer.SerializeWriter in project fastjson by alibaba.
the class SerializeWriterTest_10 method test_erro_0.
public void test_erro_0() throws Exception {
SerializeWriter out = new SerializeWriter();
Exception error = null;
try {
out.write(new char[0], -1, 0);
} catch (Exception ex) {
error = ex;
}
Assert.assertNotNull(error);
out.close();
}
use of com.alibaba.fastjson.serializer.SerializeWriter in project fastjson by alibaba.
the class SerializeWriterTest_10 method test_erro_1.
public void test_erro_1() throws Exception {
SerializeWriter out = new SerializeWriter();
Exception error = null;
try {
out.write(new char[0], 1, 0);
} catch (Exception ex) {
error = ex;
}
Assert.assertNotNull(error);
out.close();
}
use of com.alibaba.fastjson.serializer.SerializeWriter in project fastjson by alibaba.
the class SerializeWriterTest_10 method test_erro_2.
public void test_erro_2() throws Exception {
SerializeWriter out = new SerializeWriter();
Exception error = null;
try {
out.write(new char[0], 0, -1);
} catch (Exception ex) {
error = ex;
}
Assert.assertNotNull(error);
out.close();
}
use of com.alibaba.fastjson.serializer.SerializeWriter in project fastjson by alibaba.
the class SerializeWriterTest_10 method test_erro_4.
public void test_erro_4() throws Exception {
SerializeWriter out = new SerializeWriter();
Exception error = null;
try {
out.write(new char[] { '0', '0' }, 1, Integer.MAX_VALUE);
} catch (Exception ex) {
error = ex;
}
Assert.assertNotNull(error);
out.close();
}
Aggregations