Browse Source

Fixed #683

cl-refactor
Gav Wood 10 years ago
parent
commit
78c202cae4
  1. 2
      libsolidity/InterfaceHandler.cpp
  2. 2
      libsolidity/Token.h
  3. 16
      test/SolidityABIJSON.cpp

2
libsolidity/InterfaceHandler.cpp

@ -56,7 +56,7 @@ std::unique_ptr<std::string> InterfaceHandler::getABIInterface(ContractDefinitio
};
method["name"] = f->getName();
method["const"] = f->isDeclaredConst();
method["constant"] = f->isDeclaredConst();
method["inputs"] = populateParameters(f->getParameters());
method["outputs"] = populateParameters(f->getReturnParameters());
methods.append(method);

2
libsolidity/Token.h

@ -142,7 +142,7 @@ namespace solidity
/* Keywords */ \
K(BREAK, "break", 0) \
K(CASE, "case", 0) \
K(CONST, "const", 0) \
K(CONST, "constant", 0) \
K(CONTINUE, "continue", 0) \
K(CONTRACT, "contract", 0) \
K(DEFAULT, "default", 0) \

16
test/SolidityABIJSON.cpp

@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(basic_test)
char const* interface = R"([
{
"name": "f",
"const": false,
"constant": false,
"inputs": [
{
"name": "a",
@ -115,7 +115,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods)
char const* interface = R"([
{
"name": "f",
"const": false,
"constant": false,
"inputs": [
{
"name": "a",
@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods)
},
{
"name": "g",
"const": false,
"constant": false,
"inputs": [
{
"name": "b",
@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(multiple_params)
char const* interface = R"([
{
"name": "f",
"const": false,
"constant": false,
"inputs": [
{
"name": "a",
@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order)
char const* interface = R"([
{
"name": "c",
"const": false,
"constant": false,
"inputs": [
{
"name": "b",
@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(multiple_methods_order)
},
{
"name": "f",
"const": false,
"constant": false,
"inputs": [
{
"name": "a",
@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(const_function)
char const* interface = R"([
{
"name": "boo",
"const": true,
"constant": true,
"inputs": [{
"name": "a",
"type": "uint32"
@ -252,7 +252,7 @@ BOOST_AUTO_TEST_CASE(const_function)
},
{
"name": "foo",
"const": false,
"constant": false,
"inputs": [
{
"name": "a",

Loading…
Cancel
Save