mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move string distance function to utils and format error message
This commit is contained in:
committed by
Alex Beregszaszi
parent
2859834e58
commit
b1417b318f
@@ -2089,7 +2089,7 @@ BOOST_AUTO_TEST_CASE(similar_name_suggestions_expected)
|
||||
function g() public { fun(); }
|
||||
}
|
||||
)";
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean func?");
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean \"func\"?");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(no_name_suggestion)
|
||||
@@ -2115,7 +2115,7 @@ BOOST_AUTO_TEST_CASE(multiple_similar_suggestions)
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean var1, var2, var3, var4 or var5?");
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean \"var1\", \"var2\", \"var3\", \"var4\" or \"var5\"?");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(multiple_scopes_suggestions)
|
||||
@@ -2129,7 +2129,7 @@ BOOST_AUTO_TEST_CASE(multiple_scopes_suggestions)
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean log8, log9, log0, log1, log2, log3 or log4?");
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean \"log8\", \"log9\", \"log0\", \"log1\", \"log2\", \"log3\" or \"log4\"?");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(inheritence_suggestions)
|
||||
@@ -2142,7 +2142,7 @@ BOOST_AUTO_TEST_CASE(inheritence_suggestions)
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean func?");
|
||||
CHECK_ERROR(sourceCode, DeclarationError, "Undeclared identifier. Did you mean \"func\"?");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(no_spurious_suggestions)
|
||||
|
||||
Reference in New Issue
Block a user