Package com.aptana.shared_core.string

Examples of com.aptana.shared_core.string.FastStringBuffer.clear()


        assertEquals("\n", new String(in.GetSuffix(1)));
        in.AppendSuffix(buf.clear(), 1);
        assertEquals("\n", buf.toString());

        assertEquals("a\n", new String(in.GetSuffix(2)));
        in.AppendSuffix(buf.clear(), 2);
        assertEquals("a\n", buf.toString());

        assertEquals('b', in.readChar());
        checkStart(in, 1, 1);
        assertEquals(1, in.getEndColumn());
View Full Code Here


        in.backup(0);
        assertEquals(3, in.getEndColumn());
        assertEquals(2, in.getEndLine());

        assertEquals("bc\n", new String(in.GetSuffix(3)));
        in.AppendSuffix(buf.clear(), 3);
        assertEquals("bc\n", buf.toString());

        cs = new char[6];
        cs[1] = 'a';
        cs[2] = '\n';
View Full Code Here

        cs[3] = 'b';
        cs[4] = 'c';
        cs[5] = '\n';
        final String suf = new String(in.GetSuffix(6));
        assertEquals(new String(cs), suf);
        in.AppendSuffix(buf.clear(), 6);
        assertEquals(new String(cs), buf.toString());

        in.backup(4);

        assertEquals("a", in.GetImage());
View Full Code Here

                "call(\n" +
                "   ttt,\n" +
                ")\n";
        ParsingUtils parsing = ParsingUtils.create(str);
        FastStringBuffer buf = new FastStringBuffer();
        assertEquals(6, parsing.getFullFlattenedLine(0, buf.clear()));
        assertEquals('c', str.charAt(6));
        assertEquals("line ", buf.toString());

        parsing.getFullFlattenedLine(1, buf.clear());
        assertEquals("ine ", buf.toString());
View Full Code Here

        FastStringBuffer buf = new FastStringBuffer();
        assertEquals(6, parsing.getFullFlattenedLine(0, buf.clear()));
        assertEquals('c', str.charAt(6));
        assertEquals("line ", buf.toString());

        parsing.getFullFlattenedLine(1, buf.clear());
        assertEquals("ine ", buf.toString());

        assertEquals(23, parsing.getFullFlattenedLine(8, buf.clear()));
        assertEquals('0', str.charAt(23));
        assertEquals("start =10 30", buf.toString());
View Full Code Here

        assertEquals("line ", buf.toString());

        parsing.getFullFlattenedLine(1, buf.clear());
        assertEquals("ine ", buf.toString());

        assertEquals(23, parsing.getFullFlattenedLine(8, buf.clear()));
        assertEquals('0', str.charAt(23));
        assertEquals("start =10 30", buf.toString());

        assertEquals(39, parsing.getFullFlattenedLine(25, buf.clear()));
        assertEquals("call", buf.toString());
View Full Code Here

        assertEquals(23, parsing.getFullFlattenedLine(8, buf.clear()));
        assertEquals('0', str.charAt(23));
        assertEquals("start =10 30", buf.toString());

        assertEquals(39, parsing.getFullFlattenedLine(25, buf.clear()));
        assertEquals("call", buf.toString());
        assertEquals(')', str.charAt(39));
    }

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

                "line = '''\n" +
                "bla bla bla''' = xxy\n" +
                "what";
        ParsingUtils parsing = ParsingUtils.create(str);
        FastStringBuffer buf = new FastStringBuffer();
        assertEquals(30, parsing.getFullFlattenedLine(0, buf.clear()));
        assertEquals('y', str.charAt(30));
        assertEquals("line =  = xxy", buf.toString());
    }

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

                "a = c(\r\n" +
                "a)\r\n" +
                "b = 20\r\n";
        ParsingUtils parsing = ParsingUtils.create(str);
        FastStringBuffer buf = new FastStringBuffer();
        assertEquals(9, parsing.getFullFlattenedLine(0, buf.clear()));
        assertEquals("a = c", buf.toString());
        assertEquals(')', str.charAt(9));
    }

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

                "a = c(\r" +
                "a)\r" +
                "b = 20\r";
        ParsingUtils parsing = ParsingUtils.create(str);
        FastStringBuffer buf = new FastStringBuffer();
        assertEquals(8, parsing.getFullFlattenedLine(0, buf.clear()));
        assertEquals("a = c", buf.toString());
        assertEquals(')', str.charAt(8));
    }

    public void testGetFlattenedLine5() throws Exception {
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.