alexdovzhanyn / AlchemyVM

WebAssembly Virtual Machine Built In Elixir
MIT License
189 stars 5 forks source link

I'm getting errors running the tests #16

Closed olafura closed 5 years ago

olafura commented 5 years ago

Operating system:

uname -a
Linux olafura-GS73-Stealth-8RF 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: neon
Description:    KDE neon User Edition 5.14
Release:        18.04
Codename:       bionic

I'm using asdf, here are the versions:

Erlang:
21.0.5
erl --version
Erlang/OTP 21 [erts-10.0.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]

Elixir:

1.7.4
elixir --version
Erlang/OTP 21 [erts-10.0.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]

Elixir 1.7.4 (compiled with Erlang/OTP 21)

.

  1) test 32 bit uint can rem properly (WaspVM.ExecutorTest)
     test/executor_test.exs:106
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "i32__rem_u", [5, 2]) == {:ok, 1}
     left:  {:ok, 2}
     right: {:ok, 1}
     stacktrace:
       test/executor_test.exs:109: (test)

  2) test 64 bit float with sub properly (WaspVM.ExecutorTest)
     test/executor_test.exs:49
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "f64__sub", [4.0, 2.0]) == {:ok, 2.0}
     left:  {:ok, -2.0}
     right: {:ok, 2.0}
     stacktrace:
       test/executor_test.exs:52: (test)

.

  3) test 32 bit int / ns can shl properly (WaspVM.ExecutorTest)
     test/executor_test.exs:186
     Assertion with == failed
     code:  assert Kernel.round(answer) == 4294966496
     left:  4294967296
     right: 4294966496
     stacktrace:
       test/executor_test.exs:194: (test)

.

  4) test 32 bit signed int can divide properly (WaspVM.ExecutorTest)
     test/executor_test.exs:88
     Assertion with == failed
     code:  assert answer == 4294967294
     left:  2147483648.0
     right: 4294967294
     stacktrace:
       test/executor_test.exs:93: (test)

.

  5) test 32 bit integers with sub properly (WaspVM.ExecutorTest)
     test/executor_test.exs:31
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "i32__sub", [4, 2]) == {:ok, 2}
     left:  {:ok, -2}
     right: {:ok, 2}
     stacktrace:
       test/executor_test.exs:34: (test)

..

  6) test 32 bit float with sub properly (WaspVM.ExecutorTest)
     test/executor_test.exs:43
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "f32__sub", [4.0, 2.0]) == {:ok, 2.0}
     left:  {:ok, -2.0}
     right: {:ok, 2.0}
     stacktrace:
       test/executor_test.exs:46: (test)

.

  7) test 32 bit uint can shr properly (WaspVM.ExecutorTest)
     test/executor_test.exs:231
     Assertion with == failed
     code:  assert Kernel.round(answer) == 536870899
     left:  2147483661
     right: 536870899
     stacktrace:
       test/executor_test.exs:240: (test)

  8) test 64 bit uint can rem properly (WaspVM.ExecutorTest)
     test/executor_test.exs:112
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "i64__rem_u", [5, 2]) == {:ok, 1}
     left:  {:ok, 2}
     right: {:ok, 1}
     stacktrace:
       test/executor_test.exs:115: (test)

  9) test 64 bit int can shl properly (WaspVM.ExecutorTest)
     test/executor_test.exs:197
     Assertion with == failed
     code:  assert round(answer) == 18446744073709550816
     left:  18446744073709551616
     right: 18446744073709550816
     stacktrace:
       test/executor_test.exs:206: (test)

..

 10) test 32 bit unsgined int can divide properly (WaspVM.ExecutorTest)
     test/executor_test.exs:81
     Assertion with == failed
     code:  assert result == {:ok, 2}
     left:  {:ok, 0}
     right: {:ok, 2}
     stacktrace:
       test/executor_test.exs:85: (test)

 11) test 32 bit float can divide properly (WaspVM.ExecutorTest)
     test/executor_test.exs:96
     Assertion with == failed
     code:  assert result == {:ok, 2.0}
     left:  {:ok, 0.5}
     right: {:ok, 2.0}
     stacktrace:
       test/executor_test.exs:100: (test)

..

 12) test 32 bit sint can shr properly (WaspVM.ExecutorTest)
     test/executor_test.exs:210
     Assertion with == failed
     code:  assert Bitwise.band(result, 4294967295) == 4294967283
     left:  0
     right: 4294967283
     stacktrace:
       test/executor_test.exs:216: (test)

..

 13) test 64 bit sint can shr properly (WaspVM.ExecutorTest)
     test/executor_test.exs:219
     Assertion with == failed
     code:  assert Bitwise.band(result, 18446744073709551615) == 18446744073709551603
     left:  0
     right: 18446744073709551603
     stacktrace:
       test/executor_test.exs:226: (test)

..

 14) test 32 bit sint can rem properly (WaspVM.ExecutorTest)
     test/executor_test.exs:118
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "i32__rem_s", [-5, 2]) == {:ok, 4294967295}
     left:  {:ok, 4294967294.0}
     right: {:ok, 4294967295}
     stacktrace:
       test/executor_test.exs:121: (test)

...

 15) test 64 bit integers with sub properly (WaspVM.ExecutorTest)
     test/executor_test.exs:37
     Assertion with == failed
     code:  assert WaspVM.execute(pid, "i64__sub", [4, 2]) == {:ok, 2}
     left:  {:ok, -2}
     right: {:ok, 2}
     stacktrace:
       test/executor_test.exs:40: (test)

.........

Finished in 0.3 seconds
42 tests, 15 failures

Randomized with seed 22201
olafura commented 5 years ago

Instruction-Codes runs fine, maybe I should just be patient :grin:

alexdovzhanyn commented 5 years ago

Yeah we've fixed all the tests on the Instruction-Codes branch, once that's merged in it should be good to go

alexdovzhanyn commented 5 years ago

Instruction-Codes has been merged in, all tests passing.