()
| 53 | |
| 54 | // NOTE: the specifics of indentation may change in the future! |
| 55 | @Test |
| 56 | public void testWriter() throws Exception { |
| 57 | test("[]", L(), 2); |
| 58 | test("{}", O(), 2); |
| 59 | test("[\n 10,\n 20]", L(10, 20), 2); |
| 60 | test("{\n 'a':10,\n 'b':{\n 'c':20,\n 'd':30}}", O("a", 10, "b", O("c", 20, "d", 30)), 1); |
| 61 | |
| 62 | test("['\\r\\n\\u0000\\'']", L("\r\n\u0000\""), 2); |
| 63 | } |
| 64 | |
| 65 | public static class Unknown { |
| 66 | @Override |