package org.ethereum.solidity;

import org.ethereum.solidity.compiler.CompilationResult;
import org.ethereum.solidity.compiler.SolidityCompiler;
import org.junit.Ignore;
import org.junit.Test;

import java.io.IOException;

/**
 * Created by Anton Nashatyrev on 03.03.2016.
 */
public class CompilerTest {

    @Ignore
    @Test
    public void simpleTest() throws IOException {
        String contract =
                "contract a {" +
                "  int i1;" +
                "  function i() returns (int) {" +
                "    return i1;" +
                "  }" +
                "}";
        SolidityCompiler.Result res = SolidityCompiler.compile(
                contract.getBytes(), true, SolidityCompiler.Options.ABI, SolidityCompiler.Options.BIN, SolidityCompiler.Options.INTERFACE);
        System.out.println(res.output);
        System.out.println(res.errors);
        CompilationResult result = CompilationResult.parse(res.output);
        System.out.println(result.contracts.get("a").bin);
    }

    public static void main(String[] args) throws Exception {
        new CompilerTest().simpleTest();
    }
}

@@ -303,20 +303,8 @@
  %7B%0A%0A
-    @Ignore%0A
     

Remove Ignore from test