password:=getPassPhrase("Your new account is locked with a password. Please give a password. Do not forget this password.",true,0,utils.MakePasswordList(ctx))
passphrase:=getPassPhrase("Your new account is locked with a password. Please give a password. Do not forget this password.",true,0,utils.MakePasswordList(ctx))
info=`{"source":"\ncontract test {\n /// @notice Will multiply `+"`a`"+` by 7.\n function multiply(uint a) returns(uint d) {\n return a * 7;\n }\n}\n","language":"Solidity","languageVersion":"0.1.1","compilerVersion":"0.1.1","compilerOptions":"--binary file --json-abi file --natspec-user file --natspec-dev file --add-std 1","abiDefinition":[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}],"userDoc":{"methods":{"multiply(uint256)":{"notice":"Will multiply `+"`a`"+` by 7."}}},"developerDoc":{"methods":{}}}`
testInfo=`{"source":"\ncontract test {\n /// @notice Will multiply `+"`a`"+` by 7.\n function multiply(uint a) returns(uint d) {\n return a * 7;\n }\n}\n","language":"Solidity","languageVersion":"0.1.1","compilerVersion":"0.1.1","compilerOptions":"--binary file --json-abi file --natspec-user file --natspec-dev file --add-std 1","abiDefinition":[{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"type":"function"}],"userDoc":{"methods":{"multiply(uint256)":{"notice":"Will multiply `+"`a`"+` by 7."}}},"developerDoc":{"methods":{}}}`
)
funcTestCompiler(t*testing.T){
sol,err:=New("")
funcskipUnsupported(t*testing.T){
sol,err:=SolidityVersion("")
iferr!=nil{
t.Skipf("solc not found: %v",err)
}elseifsol.Version()!=solcVersion{
t.Skipf("WARNING: a newer version of solc found (%v, expect %v)",sol.Version(),solcVersion)
}
contracts,err:=sol.Compile(source)
iferr!=nil{
t.Errorf("error compiling source. result %v: %v",contracts,err)
t.Skip(err)
return
}
ifsol.Version!=supportedSolcVersion{
t.Skipf("unsupported version of solc found (%v, expect %v)",sol.Version,supportedSolcVersion)