aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-18 05:09:36 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-07 18:52:17 +0800
commit846f34f78b5f76233655d0cf3611706e99f2efe2 (patch)
tree4e25f0320e30c0ed45b706835fd4377632bdcb45 /tests/state_test.go
parent698e98d9814605bfea98ba3ad2fe7fda073cb2b1 (diff)
downloadgo-tangerine-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.gz
go-tangerine-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.zst
go-tangerine-846f34f78b5f76233655d0cf3611706e99f2efe2.zip
core/vm, tests: implemented semi-jit vm
* changed stack and removed stack ptr. Let go decide on slice reuse.
Diffstat (limited to 'tests/state_test.go')
-rw-r--r--tests/state_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/state_test.go b/tests/state_test.go
index 1684614df..eb1900e1b 100644
--- a/tests/state_test.go
+++ b/tests/state_test.go
@@ -20,8 +20,25 @@ import (
"os"
"path/filepath"
"testing"
+
+ "github.com/ethereum/go-ethereum/core/vm"
)
+func init() {
+ if os.Getenv("JITVM") == "true" {
+ vm.ForceJit = true
+ } else {
+ vm.DisableJit = true
+ }
+}
+
+func BenchmarkStateCall1024(b *testing.B) {
+ fn := filepath.Join(stateTestDir, "stCallCreateCallCodeTest.json")
+ if err := BenchVmTest(fn, bconf{"Call1024BalanceTooLow", true, false}, b); err != nil {
+ b.Error(err)
+ }
+}
+
func TestStateSystemOperations(t *testing.T) {
fn := filepath.Join(stateTestDir, "stSystemOperationsTest.json")
if err := RunStateTest(fn, StateSkipTests); err != nil {