From d80d324de7fa7eb79e21d1e6d7cbca4ba3eebcd0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 6 Dec 2018 15:59:58 +0100 Subject: Tests for gas costs. --- test/cmdlineTests/data_storage.sol | 15 +++++++++++++++ test/cmdlineTests/data_storage.sol.args | 1 + test/cmdlineTests/data_storage.sol.stdout | 7 +++++++ 3 files changed, 23 insertions(+) create mode 100644 test/cmdlineTests/data_storage.sol create mode 100644 test/cmdlineTests/data_storage.sol.args create mode 100644 test/cmdlineTests/data_storage.sol.stdout (limited to 'test/cmdlineTests') 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 -- cgit