aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-10 18:01:05 +0800
committerchriseth <c@ethdev.com>2015-09-11 21:21:37 +0800
commita9edc7b1a601747f96e47fe60a5fc10df489696f (patch)
tree8165a9a44cc6cf23f6a8d8b152facfe3fd65a909 /test
parent337fde9d11adac85800b405a3fdb4bcd09039ebf (diff)
downloaddexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.gz
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.bz2
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.lz
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.xz
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.zst
dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.zip
Transition from bytecode to more general linker objects.
Diffstat (limited to 'test')
-rw-r--r--test/contracts/AuctionRegistrar.cpp2
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp2
-rw-r--r--test/contracts/Wallet.cpp2
-rw-r--r--test/libsolidity/Assembly.cpp2
-rw-r--r--test/libsolidity/GasMeter.cpp2
-rw-r--r--test/libsolidity/SolidityExpressionCompiler.cpp2
-rw-r--r--test/libsolidity/solidityExecutionFramework.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index 0935c874..a8b57f2f 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -233,7 +233,7 @@ protected:
m_compiler.reset(false, m_addStandardSources);
m_compiler.addSource("", registrarCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
- s_compiledRegistrar.reset(new bytes(m_compiler.bytecode("GlobalRegistrar")));
+ s_compiledRegistrar.reset(new bytes(m_compiler.object("GlobalRegistrar").bytecode));
}
sendMessage(*s_compiledRegistrar, true);
BOOST_REQUIRE(!m_output.empty());
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index 266eb923..f42f4492 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -125,7 +125,7 @@ protected:
m_compiler.reset(false, m_addStandardSources);
m_compiler.addSource("", registrarCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
- s_compiledRegistrar.reset(new bytes(m_compiler.bytecode("FixedFeeRegistrar")));
+ s_compiledRegistrar.reset(new bytes(m_compiler.object("FixedFeeRegistrar").bytecode));
}
sendMessage(*s_compiledRegistrar, true);
BOOST_REQUIRE(!m_output.empty());
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index 32a53199..4a4848f1 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -440,7 +440,7 @@ protected:
m_compiler.reset(false, m_addStandardSources);
m_compiler.addSource("", walletCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
- s_compiledWallet.reset(new bytes(m_compiler.bytecode("Wallet")));
+ s_compiledWallet.reset(new bytes(m_compiler.object("Wallet").bytecode));
}
bytes args = encodeArgs(u256(0x60), _required, _dailyLimit, u256(_owners.size()), _owners);
sendMessage(*s_compiledWallet + args, true, _value);
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp
index eb4999e7..5bd6fed3 100644
--- a/test/libsolidity/Assembly.cpp
+++ b/test/libsolidity/Assembly.cpp
@@ -66,7 +66,7 @@ eth::AssemblyItems compileContract(const string& _sourceCode)
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
{
Compiler compiler;
- compiler.compileContract(*contract, map<ContractDefinition const*, bytes const*>{});
+ compiler.compileContract(*contract, map<ContractDefinition const*, Assembly const*>{});
return compiler.runtimeAssemblyItems();
}
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index 897d12fd..6d7c06a3 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -63,7 +63,7 @@ public:
auto state = make_shared<KnownState>();
PathGasMeter meter(*m_compiler.assemblyItems());
GasMeter::GasConsumption gas = meter.estimateMax(0, state);
- u256 bytecodeSize(m_compiler.runtimeBytecode().size());
+ u256 bytecodeSize(m_compiler.runtimeObject().bytecode.size());
gas += bytecodeSize * c_createDataGas;
BOOST_REQUIRE(!gas.isInfinite);
BOOST_CHECK(gas.value == m_gasUsed);
diff --git a/test/libsolidity/SolidityExpressionCompiler.cpp b/test/libsolidity/SolidityExpressionCompiler.cpp
index 9b1c026f..747668b0 100644
--- a/test/libsolidity/SolidityExpressionCompiler.cpp
+++ b/test/libsolidity/SolidityExpressionCompiler.cpp
@@ -138,7 +138,7 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
for (vector<string> const& function: _functions)
context << context.functionEntryLabel(dynamic_cast<FunctionDefinition const&>(resolveDeclaration(function, resolver)));
- bytes instructions = context.assembledBytecode();
+ bytes instructions = context.assembledObject().bytecode;
// debug
// cout << eth::disassemble(instructions) << endl;
return instructions;
diff --git a/test/libsolidity/solidityExecutionFramework.h b/test/libsolidity/solidityExecutionFramework.h
index 86e7d351..8823114a 100644
--- a/test/libsolidity/solidityExecutionFramework.h
+++ b/test/libsolidity/solidityExecutionFramework.h
@@ -59,7 +59,7 @@ public:
m_compiler.reset(false, m_addStandardSources);
m_compiler.addSource("", _sourceCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
- bytes code = m_compiler.bytecode(_contractName);
+ bytes code = m_compiler.object(_contractName).bytecode;
sendMessage(code + _arguments, true, _value);
return m_output;
}