aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/GasMeter.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-01 00:44:29 +0800
committerLianaHus <liana@ethdev.com>2015-09-08 19:12:00 +0800
commit1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4 (patch)
tree6ecb1323bec51a67a53d63bfd250f4ccfcee926c /test/libsolidity/GasMeter.cpp
parent6f4a39c183a905b8e07da59c17bfd25c2febbf7f (diff)
downloaddexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.gz
dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.zst
dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.zip
renamed getter functions
Diffstat (limited to 'test/libsolidity/GasMeter.cpp')
-rw-r--r--test/libsolidity/GasMeter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/libsolidity/GasMeter.cpp b/test/libsolidity/GasMeter.cpp
index 5f442654..bcf9bbc1 100644
--- a/test/libsolidity/GasMeter.cpp
+++ b/test/libsolidity/GasMeter.cpp
@@ -48,8 +48,8 @@ public:
m_compiler.setSource(_sourceCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(), "Compiling contract failed");
- AssemblyItems const* items = m_compiler.getRuntimeAssemblyItems("");
- ASTNode const& sourceUnit = m_compiler.getAST();
+ AssemblyItems const* items = m_compiler.runtimeAssemblyItems("");
+ ASTNode const& sourceUnit = m_compiler.AST();
BOOST_REQUIRE(items != nullptr);
m_gasCosts = GasEstimator::breakToStatementLevel(
GasEstimator::structuralEstimation(*items, vector<ASTNode const*>({&sourceUnit})),
@@ -61,9 +61,9 @@ public:
{
compileAndRun(_sourceCode);
auto state = make_shared<KnownState>();
- PathGasMeter meter(*m_compiler.getAssemblyItems());
+ PathGasMeter meter(*m_compiler.assemblyItems());
GasMeter::GasConsumption gas = meter.estimateMax(0, state);
- u256 bytecodeSize(m_compiler.getRuntimeBytecode().size());
+ u256 bytecodeSize(m_compiler.runtimeBytecode().size());
gas += bytecodeSize * c_createDataGas;
BOOST_REQUIRE(!gas.isInfinite);
BOOST_CHECK(gas.value == m_gasUsed);
@@ -82,7 +82,7 @@ public:
}
GasMeter::GasConsumption gas = GasEstimator::functionalEstimation(
- *m_compiler.getRuntimeAssemblyItems(),
+ *m_compiler.runtimeAssemblyItems(),
_sig
);
BOOST_REQUIRE(!gas.isInfinite);
@@ -115,11 +115,11 @@ BOOST_AUTO_TEST_CASE(non_overlapping_filtered_costs)
{
auto second = first;
for (++second; second != m_gasCosts.cend(); ++second)
- if (first->first->getLocation().intersects(second->first->getLocation()))
+ if (first->first->location().intersects(second->first->location()))
{
BOOST_CHECK_MESSAGE(false, "Source locations should not overlap!");
- SourceReferenceFormatter::printSourceLocation(cout, first->first->getLocation(), m_compiler.getScanner());
- SourceReferenceFormatter::printSourceLocation(cout, second->first->getLocation(), m_compiler.getScanner());
+ SourceReferenceFormatter::printSourceLocation(cout, first->first->location(), m_compiler.scanner());
+ SourceReferenceFormatter::printSourceLocation(cout, second->first->location(), m_compiler.scanner());
}
}
}