aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhett Aultman <rhett.aultman@meraki.net>2017-01-17 07:07:48 +0800
committerRhett Aultman <rhett.aultman@meraki.net>2017-01-17 07:07:48 +0800
commit88a2ac25e5e10aa7cea8627b60aa663f7ed6066d (patch)
treef9b34d62409fa21fff59a3d134ac1d3be4a49c8b
parent43dbf01e73b915dbeddfd7eb9d62112fdf2f99f1 (diff)
downloaddexon-solidity-88a2ac25e5e10aa7cea8627b60aa663f7ed6066d.tar.gz
dexon-solidity-88a2ac25e5e10aa7cea8627b60aa663f7ed6066d.tar.zst
dexon-solidity-88a2ac25e5e10aa7cea8627b60aa663f7ed6066d.zip
Revert "Fix contract lookup in tests"
This reverts commit f8914c6b281f398d6084f10708233bf79d633ef0.
-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/SolidityABIJSON.cpp4
-rw-r--r--test/libsolidity/SolidityExecutionFramework.h6
5 files changed, 6 insertions, 10 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index 0169648e..fb8c1c68 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -224,7 +224,7 @@ protected:
m_compiler.reset(false);
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.object(":GlobalRegistrar").bytecode));
+ 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 6ef1a8fe..39c32eb7 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -136,7 +136,7 @@ protected:
m_compiler.reset(false);
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.object(":FixedFeeRegistrar").bytecode));
+ 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 24ecebe7..80f06613 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -451,7 +451,7 @@ protected:
m_compiler.reset(false);
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.object(":Wallet").bytecode));
+ 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/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp
index a54e9b7e..043d74ed 100644
--- a/test/libsolidity/SolidityABIJSON.cpp
+++ b/test/libsolidity/SolidityABIJSON.cpp
@@ -762,8 +762,8 @@ BOOST_AUTO_TEST_CASE(metadata_stamp)
}
)";
BOOST_REQUIRE(m_compilerStack.compile(std::string(sourceCode)));
- bytes const& bytecode = m_compilerStack.runtimeObject(":test").bytecode;
- bytes hash = dev::swarmHash(m_compilerStack.onChainMetadata(":test")).asBytes();
+ bytes const& bytecode = m_compilerStack.runtimeObject("test").bytecode;
+ bytes hash = dev::swarmHash(m_compilerStack.onChainMetadata("test")).asBytes();
BOOST_REQUIRE(hash.size() == 32);
BOOST_REQUIRE(bytecode.size() >= 2);
size_t metadataCBORSize = (size_t(bytecode.end()[-2]) << 8) + size_t(bytecode.end()[-1]);
diff --git a/test/libsolidity/SolidityExecutionFramework.h b/test/libsolidity/SolidityExecutionFramework.h
index 00e8330c..03e3a881 100644
--- a/test/libsolidity/SolidityExecutionFramework.h
+++ b/test/libsolidity/SolidityExecutionFramework.h
@@ -67,11 +67,7 @@ public:
);
BOOST_ERROR("Compiling contract failed");
}
- eth::LinkerObject obj;
- if (_contractName.empty())
- obj = m_compiler.object(_contractName);
- else
- obj = m_compiler.object(":" + _contractName);
+ eth::LinkerObject obj = m_compiler.object(_contractName);
BOOST_REQUIRE(obj.linkReferences.empty());
sendMessage(obj.bytecode + _arguments, true, _value);
return m_output;