aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-16 21:52:39 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-16 21:52:43 +0800
commit0bed065ee73c467014d5464a7d9dc2596d6e7dfc (patch)
tree19f8ce9363d333a87113ac0510cec0d5dc130c2a /test
parentadce9ca812bd0c8a79e1bc924ad70773bb9006b1 (diff)
downloaddexon-solidity-0bed065ee73c467014d5464a7d9dc2596d6e7dfc.tar.gz
dexon-solidity-0bed065ee73c467014d5464a7d9dc2596d6e7dfc.tar.zst
dexon-solidity-0bed065ee73c467014d5464a7d9dc2596d6e7dfc.zip
Fix source location assertion in isoltest
Diffstat (limited to 'test')
-rw-r--r--test/tools/isoltest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index 7a147bd0..100fcbf0 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -99,8 +99,8 @@ void SyntaxTestTool::printContract() const
for (auto const& error: m_test->errorList())
if (error.locationStart >= 0 && error.locationEnd >= 0)
{
- assert(static_cast<size_t>(error.locationStart) < source.length());
- assert(static_cast<size_t>(error.locationEnd) < source.length());
+ assert(static_cast<size_t>(error.locationStart) <= source.length());
+ assert(static_cast<size_t>(error.locationEnd) <= source.length());
bool isWarning = error.type == "Warning";
for (int i = error.locationStart; i < error.locationEnd; i++)
if (isWarning)