diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-13 02:55:14 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-14 16:31:28 +0800 |
commit | d24f6fd34b3a984b87ac6054d33922116fb12977 (patch) | |
tree | d32c20e0d651d13d034cc5eaa601eccebcdf1ee8 | |
parent | 4cdb6c809a15f22085ae5850c99e05c60be8cb1b (diff) | |
download | dexon-solidity-d24f6fd34b3a984b87ac6054d33922116fb12977.tar.gz dexon-solidity-d24f6fd34b3a984b87ac6054d33922116fb12977.tar.zst dexon-solidity-d24f6fd34b3a984b87ac6054d33922116fb12977.zip |
update tests
-rw-r--r-- | test/libjulia/Common.cpp | 14 | ||||
-rw-r--r-- | test/libjulia/Common.h | 8 | ||||
-rw-r--r-- | test/libjulia/Disambiguator.cpp | 2 | ||||
-rw-r--r-- | test/libjulia/Parser.cpp | 6 |
4 files changed, 15 insertions, 15 deletions
diff --git a/test/libjulia/Common.cpp b/test/libjulia/Common.cpp index 24519b01..a0592667 100644 --- a/test/libjulia/Common.cpp +++ b/test/libjulia/Common.cpp @@ -16,7 +16,7 @@ */ /** * @date 2017 - * Common functions the iulia tests. + * Common functions the Yul tests. */ #include <test/libjulia/Common.h> @@ -52,9 +52,9 @@ void dev::julia::test::printErrors(ErrorList const& _errors, Scanner const& _sca } -pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::julia::test::parse(string const& _source, bool _julia) +pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::julia::test::parse(string const& _source, bool _yul) { - auto flavour = _julia ? assembly::AsmFlavour::IULIA : assembly::AsmFlavour::Strict; + auto flavour = _yul ? assembly::AsmFlavour::Yul : assembly::AsmFlavour::Strict; ErrorList errors; ErrorReporter errorReporter(errors); auto scanner = make_shared<Scanner>(CharStream(_source), ""); @@ -83,13 +83,13 @@ pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::julia::test: return {}; } -assembly::Block dev::julia::test::disambiguate(string const& _source, bool _julia) +assembly::Block dev::julia::test::disambiguate(string const& _source, bool _yul) { - auto result = parse(_source, _julia); + auto result = parse(_source, _yul); return boost::get<Block>(Disambiguator(*result.second)(*result.first)); } -string dev::julia::test::format(string const& _source, bool _julia) +string dev::julia::test::format(string const& _source, bool _yul) { - return assembly::AsmPrinter(_julia)(*parse(_source, _julia).first); + return assembly::AsmPrinter(_yul)(*parse(_source, _yul).first); } diff --git a/test/libjulia/Common.h b/test/libjulia/Common.h index 1371101c..b9c3d2fb 100644 --- a/test/libjulia/Common.h +++ b/test/libjulia/Common.h @@ -16,7 +16,7 @@ */ /** * @date 2017 - * Common functions the iulia tests. + * Common functions the Yul tests. */ #pragma once @@ -46,9 +46,9 @@ namespace test void printErrors(solidity::ErrorList const& _errors, solidity::Scanner const& _scanner); std::pair<std::shared_ptr<solidity::assembly::Block>, std::shared_ptr<solidity::assembly::AsmAnalysisInfo>> -parse(std::string const& _source, bool _julia = true); -solidity::assembly::Block disambiguate(std::string const& _source, bool _julia = true); -std::string format(std::string const& _source, bool _julia = true); +parse(std::string const& _source, bool _yul = true); +solidity::assembly::Block disambiguate(std::string const& _source, bool _yul = true); +std::string format(std::string const& _source, bool _yul = true); } } diff --git a/test/libjulia/Disambiguator.cpp b/test/libjulia/Disambiguator.cpp index a6338449..ba1a06b0 100644 --- a/test/libjulia/Disambiguator.cpp +++ b/test/libjulia/Disambiguator.cpp @@ -16,7 +16,7 @@ */ /** * @date 2017 - * Unit tests for the iulia name disambiguator. + * Unit tests for the Yul name disambiguator. */ #include <test/libjulia/Common.h> diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp index 96261dec..c59f91da 100644 --- a/test/libjulia/Parser.cpp +++ b/test/libjulia/Parser.cpp @@ -16,7 +16,7 @@ */ /** * @date 2017 - * Unit tests for parsing Julia. + * Unit tests for parsing Yul. */ #include <test/Options.h> @@ -52,7 +52,7 @@ bool parse(string const& _source, ErrorReporter& errorReporter) try { auto scanner = make_shared<Scanner>(CharStream(_source)); - auto parserResult = assembly::Parser(errorReporter, assembly::AsmFlavour::IULIA).parse(scanner, false); + auto parserResult = assembly::Parser(errorReporter, assembly::AsmFlavour::Yul).parse(scanner, false); if (parserResult) { assembly::AsmAnalysisInfo analysisInfo; @@ -61,7 +61,7 @@ bool parse(string const& _source, ErrorReporter& errorReporter) errorReporter, dev::test::Options::get().evmVersion(), boost::none, - assembly::AsmFlavour::IULIA + assembly::AsmFlavour::Yul )).analyze(*parserResult); } } |