aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-06-17 17:47:29 +0800
committerLiana Husikyan <liana@ethdev.com>2015-07-16 19:57:56 +0800
commitdd1e770009ad9ff0111e4588232aa1ab499ad4e8 (patch)
tree03fdf088b9d968571173d018a2b9fdb050b96531 /libsolidity/SolidityEndToEndTest.cpp
parentc432ec46f922bd2223ab93df6001050a1631d50d (diff)
downloaddexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar.gz
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar.bz2
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar.lz
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar.xz
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.tar.zst
dexon-solidity-dd1e770009ad9ff0111e4588232aa1ab499ad4e8.zip
modified test network to test exceptions during parsing of documentation
todo: - change to work wirh all exceptions - fix white space problems in the output text for Natspec
Diffstat (limited to 'libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--libsolidity/SolidityEndToEndTest.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp
index f4b74a37..70de7be5 100644
--- a/libsolidity/SolidityEndToEndTest.cpp
+++ b/libsolidity/SolidityEndToEndTest.cpp
@@ -25,6 +25,7 @@
#include <tuple>
#include <boost/test/unit_test.hpp>
#include <libdevcore/Hash.h>
+#include <libsolidity/Exceptions.h>
#include <test/libsolidity/solidityExecutionFramework.h>
using namespace std;
@@ -4657,6 +4658,32 @@ BOOST_AUTO_TEST_CASE(bytes_memory_index_access)
) == encodeArgs(u256(data.size()), string("d")));
}
+BOOST_AUTO_TEST_CASE(dev_title_at_function_error)
+{
+ char const* sourceCode = " /// @author Lefteris\n"
+ " /// @title Just a test contract\n"
+ "contract test {\n"
+ " /// @dev Mul function\n"
+ " /// @title I really should not be here\n"
+ " function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n"
+ "}\n";
+
+ compileRequireThrow(sourceCode);
+}
+
+BOOST_AUTO_TEST_CASE(dev_documenting_nonexistant_param)
+{
+ char const* sourceCode = "contract test {\n"
+ " /// @dev Multiplies a number by 7 and adds second parameter\n"
+ " /// @param a Documentation for the first parameter\n"
+ " /// @param not_existing Documentation for the second parameter\n"
+ " function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n"
+ "}\n";
+
+ compileRequireThrow(sourceCode);
+}
+
+
BOOST_AUTO_TEST_CASE(storage_array_ref)
{
char const* sourceCode = R"(