mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
deprecate using namespace std
test: updat filereader test deprecate namespace std deprecate namespace std deprecate namespace std deprecate namespace std deprecate namespace std deprecate namespace std deprecate namespace std deprecate namespace std deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace deprecated std namespace depecrate namespace std deprecated namespace std check ci clean line Co-authored-by: Nikola Matić <nikola.matic@ethereum.org> purge line pure line deprecate std deprecate std deprecate std deprecate std deprecate std deprecate deprecate std bye namespace
This commit is contained in:
committed by
Nikola Matic
co-authored by
Nikola Matić
parent
df03f1412d
commit
b3230b0bdc
@@ -32,7 +32,6 @@
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::test;
|
||||
@@ -235,47 +234,47 @@ protected:
|
||||
{
|
||||
public:
|
||||
RegistrarInterface(SolidityExecutionFramework& _framework): ContractInterface(_framework) {}
|
||||
void reserve(string const& _name)
|
||||
void reserve(std::string const& _name)
|
||||
{
|
||||
callString("reserve", _name);
|
||||
}
|
||||
h160 owner(string const& _name)
|
||||
h160 owner(std::string const& _name)
|
||||
{
|
||||
return callStringReturnsAddress("owner", _name);
|
||||
}
|
||||
void setAddress(string const& _name, h160 const& _address, bool _primary)
|
||||
void setAddress(std::string const& _name, h160 const& _address, bool _primary)
|
||||
{
|
||||
callStringAddressBool("setAddress", _name, _address, _primary);
|
||||
}
|
||||
h160 addr(string const& _name)
|
||||
h160 addr(std::string const& _name)
|
||||
{
|
||||
return callStringReturnsAddress("addr", _name);
|
||||
}
|
||||
string name(h160 const& _addr)
|
||||
std::string name(h160 const& _addr)
|
||||
{
|
||||
return callAddressReturnsString("name", _addr);
|
||||
}
|
||||
void setSubRegistrar(string const& _name, h160 const& _address)
|
||||
void setSubRegistrar(std::string const& _name, h160 const& _address)
|
||||
{
|
||||
callStringAddress("setSubRegistrar", _name, _address);
|
||||
}
|
||||
h160 subRegistrar(string const& _name)
|
||||
h160 subRegistrar(std::string const& _name)
|
||||
{
|
||||
return callStringReturnsAddress("subRegistrar", _name);
|
||||
}
|
||||
void setContent(string const& _name, h256 const& _content)
|
||||
void setContent(std::string const& _name, h256 const& _content)
|
||||
{
|
||||
callStringBytes32("setContent", _name, _content);
|
||||
}
|
||||
h256 content(string const& _name)
|
||||
h256 content(std::string const& _name)
|
||||
{
|
||||
return callStringReturnsBytes32("content", _name);
|
||||
}
|
||||
void transfer(string const& _name, h160 const& _target)
|
||||
void transfer(std::string const& _name, h160 const& _target)
|
||||
{
|
||||
return callStringAddress("transfer", _name, _target);
|
||||
}
|
||||
void disown(string const& _name)
|
||||
void disown(std::string const& _name)
|
||||
{
|
||||
return callString("disown", _name);
|
||||
}
|
||||
@@ -298,7 +297,7 @@ BOOST_AUTO_TEST_CASE(reserve)
|
||||
{
|
||||
// Test that reserving works for long strings
|
||||
deployRegistrar();
|
||||
vector<string> names{"abcabcabcabcabc", "defdefdefdefdef", "ghighighighighighighighighighighighighighighi"};
|
||||
std::vector<std::string> names{"abcabcabcabcabc", "defdefdefdefdef", "ghighighighighighighighighighighighighighighi"};
|
||||
|
||||
RegistrarInterface registrar(*this);
|
||||
|
||||
@@ -317,7 +316,7 @@ BOOST_AUTO_TEST_CASE(double_reserve_long)
|
||||
{
|
||||
// Test that it is not possible to re-reserve from a different address.
|
||||
deployRegistrar();
|
||||
string name = "abcabcabcabcabcabcabcabcabcabca";
|
||||
std::string name = "abcabcabcabcabcabcabcabcabcabca";
|
||||
RegistrarInterface registrar(*this);
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), m_sender);
|
||||
@@ -333,10 +332,10 @@ BOOST_AUTO_TEST_CASE(properties)
|
||||
// Test setting and retrieving the various properties works.
|
||||
deployRegistrar();
|
||||
RegistrarInterface registrar(*this);
|
||||
string names[] = {"abcaeouoeuaoeuaoeu", "defncboagufra,fui", "ghagpyajfbcuajouhaeoi"};
|
||||
std::string names[] = {"abcaeouoeuaoeuaoeu", "defncboagufra,fui", "ghagpyajfbcuajouhaeoi"};
|
||||
size_t addr = 0x9872543;
|
||||
size_t count = 1;
|
||||
for (string const& name: names)
|
||||
for (std::string const& name: names)
|
||||
{
|
||||
m_sender = account(0);
|
||||
sendEther(account(count), u256(20) * ether);
|
||||
@@ -369,7 +368,7 @@ BOOST_AUTO_TEST_CASE(properties)
|
||||
BOOST_AUTO_TEST_CASE(transfer)
|
||||
{
|
||||
deployRegistrar();
|
||||
string name = "abcaoeguaoucaeoduceo";
|
||||
std::string name = "abcaoeguaoucaeoduceo";
|
||||
RegistrarInterface registrar(*this);
|
||||
registrar.reserve(name);
|
||||
registrar.setContent(name, h256(u256(123)));
|
||||
@@ -381,7 +380,7 @@ BOOST_AUTO_TEST_CASE(transfer)
|
||||
BOOST_AUTO_TEST_CASE(disown)
|
||||
{
|
||||
deployRegistrar();
|
||||
string name = "abcaoeguaoucaeoduceo";
|
||||
std::string name = "abcaoeguaoucaeoduceo";
|
||||
|
||||
RegistrarInterface registrar(*this);
|
||||
registrar.reserve(name);
|
||||
@@ -408,7 +407,7 @@ BOOST_AUTO_TEST_CASE(disown)
|
||||
BOOST_AUTO_TEST_CASE(auction_simple)
|
||||
{
|
||||
deployRegistrar();
|
||||
string name = "x";
|
||||
std::string name = "x";
|
||||
|
||||
RegistrarInterface registrar(*this);
|
||||
// initiate auction
|
||||
@@ -426,7 +425,7 @@ BOOST_AUTO_TEST_CASE(auction_simple)
|
||||
BOOST_AUTO_TEST_CASE(auction_bidding)
|
||||
{
|
||||
deployRegistrar();
|
||||
string name = "x";
|
||||
std::string name = "x";
|
||||
|
||||
unsigned startTime = 0x776347e2;
|
||||
m_evmcHost->tx_context.block_timestamp = startTime;
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
#include <test/libsolidity/SolidityExecutionFramework.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity::test;
|
||||
using namespace solidity::util;
|
||||
|
||||
@@ -445,7 +444,7 @@ class WalletTestFramework: public SolidityExecutionFramework
|
||||
protected:
|
||||
void deployWallet(
|
||||
u256 const& _value = 0,
|
||||
vector<h160> const& _owners = vector<h160>{},
|
||||
std::vector<h160> const& _owners = std::vector<h160>{},
|
||||
u256 _required = 1,
|
||||
u256 _dailyLimit = 0
|
||||
)
|
||||
@@ -535,7 +534,7 @@ BOOST_AUTO_TEST_CASE(remove_owner)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(initial_owners)
|
||||
{
|
||||
vector<h160> owners{
|
||||
std::vector<h160> owners{
|
||||
h160("0x42c56279432962a17176998a4747d1b4d6ed4367"),
|
||||
h160("0xd4d4669f5ba9f4c27d38ef02a358c339b5560c47"),
|
||||
h160("0xe6716f9544a56c530d868e4bfbacb172315bdead"),
|
||||
|
||||
Reference in New Issue
Block a user