aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm_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/vm_test.go
parent698e98d9814605bfea98ba3ad2fe7fda073cb2b1 (diff)
downloaddexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar
dexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.gz
dexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.bz2
dexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.lz
dexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.xz
dexon-846f34f78b5f76233655d0cf3611706e99f2efe2.tar.zst
dexon-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/vm_test.go')
-rw-r--r--tests/vm_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vm_test.go b/tests/vm_test.go
index 3674ed440..6b6b179fd 100644
--- a/tests/vm_test.go
+++ b/tests/vm_test.go
@@ -21,6 +21,20 @@ import (
"testing"
)
+func BenchmarkVmAckermann32Tests(b *testing.B) {
+ fn := filepath.Join(vmTestDir, "vmPerformanceTest.json")
+ if err := BenchVmTest(fn, bconf{"ackermann32", true, false}, b); err != nil {
+ b.Error(err)
+ }
+}
+
+func BenchmarkVmFibonacci16Tests(b *testing.B) {
+ fn := filepath.Join(vmTestDir, "vmPerformanceTest.json")
+ if err := BenchVmTest(fn, bconf{"fibonacci16", true, true}, b); err != nil {
+ b.Error(err)
+ }
+}
+
// I've created a new function for each tests so it's easier to identify where the problem lies if any of them fail.
func TestVMArithmetic(t *testing.T) {
fn := filepath.Join(vmTestDir, "vmArithmeticTest.json")