Adds some more version pragma test cases.

This commit is contained in:
Christian Parpart 2021-10-12 15:13:35 +02:00
parent b0a5b92fe9
commit 591ba184e9
4 changed files with 10 additions and 0 deletions

View File

@ -171,6 +171,8 @@ BOOST_AUTO_TEST_CASE(negative_range)
{
// Negative range tests
vector<pair<string, string>> tests = {
{"^0^1", "0.0.0"},
{"^0^1", "1.0.0"},
{"1.0.0 - 2.0.0", "2.2.3"},
{"1.0", "1.0.0-pre"},
{"1", "1.0.0-pre"},

View File

@ -0,0 +1,3 @@
pragma solidity v1.2.3;
// ----
// ParserError 1684: (0-23): Found version pragma, but failed to parse it. Please ensure there is a trailing semicolon.

View File

@ -0,0 +1,3 @@
pragma solidity >0.5.0<;
// ----
// ParserError 1684: (0-24): Found version pragma, but failed to parse it. Please ensure there is a trailing semicolon.

View File

@ -0,0 +1,2 @@
pragma solidity >=0.4.0 <0.9.0;
// ----