aboutsummaryrefslogtreecommitdiffstats
path: root/test/cmdlineTests
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-06 22:59:58 +0800
committerchriseth <chris@ethereum.org>2018-12-11 01:06:07 +0800
commitd80d324de7fa7eb79e21d1e6d7cbca4ba3eebcd0 (patch)
tree3f9e314a241bbe62cd73d348eb3117972622f52a /test/cmdlineTests
parentead13b1d21b1b10f4a13afb98a742fda9828edb2 (diff)
downloaddexon-solidity-d80d324de7fa7eb79e21d1e6d7cbca4ba3eebcd0.tar.gz
dexon-solidity-d80d324de7fa7eb79e21d1e6d7cbca4ba3eebcd0.tar.zst
dexon-solidity-d80d324de7fa7eb79e21d1e6d7cbca4ba3eebcd0.zip
Tests for gas costs.
Diffstat (limited to 'test/cmdlineTests')
-rw-r--r--test/cmdlineTests/data_storage.sol15
-rw-r--r--test/cmdlineTests/data_storage.sol.args1
-rw-r--r--test/cmdlineTests/data_storage.sol.stdout7
3 files changed, 23 insertions, 0 deletions
diff --git a/test/cmdlineTests/data_storage.sol b/test/cmdlineTests/data_storage.sol
new file mode 100644
index 00000000..cc602cc9
--- /dev/null
+++ b/test/cmdlineTests/data_storage.sol
@@ -0,0 +1,15 @@
+pragma solidity >=0.0;
+
+contract C {
+ function f() pure public {
+ require(false, "1234567890123456789012345678901");
+ require(false, "12345678901234567890123456789012");
+ require(false, "123456789012345678901234567890123");
+ require(false, "1234567890123456789012345678901234");
+ require(false, "12345678901234567890123456789012345");
+ require(false, "123456789012345678901234567890123456");
+ require(false, "123456789012345678901234567890121234567890123456789012345678901");
+ require(false, "1234567890123456789012345678901212345678901234567890123456789012");
+ require(false, "12345678901234567890123456789012123456789012345678901234567890123");
+ }
+}
diff --git a/test/cmdlineTests/data_storage.sol.args b/test/cmdlineTests/data_storage.sol.args
new file mode 100644
index 00000000..3684987e
--- /dev/null
+++ b/test/cmdlineTests/data_storage.sol.args
@@ -0,0 +1 @@
+--gas
diff --git a/test/cmdlineTests/data_storage.sol.stdout b/test/cmdlineTests/data_storage.sol.stdout
new file mode 100644
index 00000000..4a5250f7
--- /dev/null
+++ b/test/cmdlineTests/data_storage.sol.stdout
@@ -0,0 +1,7 @@
+
+======= data_storage.sol:C =======
+Gas estimation:
+construction:
+ 306 + 264400 = 264706
+external:
+ f(): 263