Package com.pogofish.jadt.source

Examples of com.pogofish.jadt.source.Source


     * Test handling of exceptions that occur during reader close
     */
    @Test
    public void testErrorClosing() {
        final IOException thrown = new IOException("oh yeah");
        final Source source = new Source() {
           
            @Override
            public String getSrcInfo() {
                return "whatever";
            }
View Full Code Here


    public void testIOException() {
        final ParseResult testResult = new ParseResult(new Doc("some source", EMPTY_PKG, NO_IMPORTS,Collections.<DataType>emptyList()), Util.<SyntaxError>list());

        final Parser parser = new DummyParser(testResult, "some source", "some string");
        try {
            final ParseResult resultDoc = parser.parse(new Source() {

                @Override
                public BufferedReader createReader() {
                    return new BufferedReader(new Reader() {
View Full Code Here

    /**
     * Create a tokenizer that will read from the given string
     */
    private BaseJavaCCParserImplTokenManager tokenizer(String testString) {
        final Source source = new StringSource("TokenizerTest", testString);
        return new BaseJavaCCParserImplTokenManager(new JavaCharStream(
                source.createReader()));
    }
View Full Code Here

TOP

Related Classes of com.pogofish.jadt.source.Source

Copyright © 2018 www.massapicom. 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.