/** * Copyright © 2012 Akiban Technologies, Inc. All rights * reserved. * * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * This program may also be available under different license terms. * For more information, see www.akiban.com or contact * licensing@akiban.com. * * Contributors: * Akiban Technologies, Inc. */ package com.akiban.sql.compiler; import com.akiban.sql.TestBase; import com.akiban.sql.parser.StatementNode; import com.akiban.sql.parser.SQLParser; import com.akiban.sql.unparser.NodeToString; import org.junit.Before; import org.junit.Ignore; import java.io.File; import java.io.IOException; import java.io.StringWriter; @Ignore public class ASTTransformTestBase extends TestBase { protected ASTTransformTestBase(String caseName, String sql, String expected, String error) { super(caseName, sql, expected, error); } public static final File RESOURCE_DIR = new File("src/test/resources/" + ASTTransformTestBase.class.getPackage().getName().replace('.', '/')); protected SQLParser parser; protected NodeToString unparser; @Before public void makeTransformers() throws Exception { parser = new SQLParser(); unparser = new NodeToString(); } protected String getTree(StatementNode stmt) throws IOException { StringWriter str = new StringWriter(); stmt.treePrint(str); return str.toString().trim(); } }