aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SyntaxTest.cpp6
-rw-r--r--test/libsolidity/syntaxTests/docstring_empty_description.sol6
2 files changed, 11 insertions, 1 deletions
diff --git a/test/libsolidity/SyntaxTest.cpp b/test/libsolidity/SyntaxTest.cpp
index f1c60458..45a851b6 100644
--- a/test/libsolidity/SyntaxTest.cpp
+++ b/test/libsolidity/SyntaxTest.cpp
@@ -21,6 +21,7 @@
#include <boost/throw_exception.hpp>
#include <cctype>
#include <fstream>
+#include <memory>
#include <stdexcept>
using namespace dev;
@@ -188,6 +189,9 @@ int SyntaxTest::registerTests(
}
else
{
+ static vector<unique_ptr<string>> filenames;
+
+ filenames.emplace_back(new string(_path.string()));
_suite.add(make_test_case(
[fullpath]
{
@@ -196,7 +200,7 @@ int SyntaxTest::registerTests(
BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
},
_path.stem().string(),
- _path.string(),
+ *filenames.back(),
0
));
numTestsAdded = 1;
diff --git a/test/libsolidity/syntaxTests/docstring_empty_description.sol b/test/libsolidity/syntaxTests/docstring_empty_description.sol
new file mode 100644
index 00000000..0caa1b23
--- /dev/null
+++ b/test/libsolidity/syntaxTests/docstring_empty_description.sol
@@ -0,0 +1,6 @@
+contract C {
+ /// @param id
+ function vote(uint id) public;
+}
+// ----
+// DocstringParsingError: No description given for param id