aboutsummaryrefslogtreecommitdiffstats
path: root/test/libevmasm
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-28 23:19:22 +0800
committerChristian Parpart <christian@ethereum.org>2018-12-01 00:07:12 +0800
commitc48a5264be4221873fe02cac57f6a41a32010fea (patch)
tree441c9c554fb9521f41f4a143dc138a33afb03589 /test/libevmasm
parent22eff22492b2d569fe56b59763ddc1cd1cf9ccf4 (diff)
downloaddexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.gz
dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.zst
dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.zip
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
Diffstat (limited to 'test/libevmasm')
-rw-r--r--test/libevmasm/Assembler.cpp6
-rw-r--r--test/libevmasm/Optimiser.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/test/libevmasm/Assembler.cpp b/test/libevmasm/Assembler.cpp
index 5ad01594..bece2be4 100644
--- a/test/libevmasm/Assembler.cpp
+++ b/test/libevmasm/Assembler.cpp
@@ -55,10 +55,12 @@ BOOST_AUTO_TEST_SUITE(Assembler)
BOOST_AUTO_TEST_CASE(all_assembly_items)
{
Assembly _assembly;
- _assembly.setSourceLocation(SourceLocation(1, 3, make_shared<string>("root.asm")));
+ auto root_asm = make_shared<CharStream>("", "root.asm");
+ _assembly.setSourceLocation(SourceLocation(1, 3, root_asm));
Assembly _subAsm;
- _subAsm.setSourceLocation(SourceLocation(6, 8, make_shared<string>("sub.asm")));
+ auto sub_asm = make_shared<CharStream>("", "sub.asm");
+ _subAsm.setSourceLocation(SourceLocation(6, 8, sub_asm));
_subAsm.append(Instruction::INVALID);
shared_ptr<Assembly> _subAsmPtr = make_shared<Assembly>(_subAsm);
diff --git a/test/libevmasm/Optimiser.cpp b/test/libevmasm/Optimiser.cpp
index c061b783..7d102948 100644
--- a/test/libevmasm/Optimiser.cpp
+++ b/test/libevmasm/Optimiser.cpp
@@ -53,7 +53,7 @@ namespace
// add dummy locations to each item so that we can check that they are not deleted
AssemblyItems input = _input;
for (AssemblyItem& item: input)
- item.setLocation(SourceLocation(1, 3, make_shared<string>("")));
+ item.setLocation(SourceLocation(1, 3, nullptr));
return input;
}