Fixed VM & Tests w/ conversion

This commit is contained in:
obscuren
2015-03-17 13:24:12 +01:00
parent ff55c6f5ba
commit 0fa7859b94
7 changed files with 30 additions and 22 deletions

15
common/types_test.go Normal file
View File

@ -0,0 +1,15 @@
package common
import "testing"
func TestBytesConversion(t *testing.T) {
bytes := []byte{5}
hash := BytesToHash(bytes)
var exp Hash
exp[31] = 5
if hash != exp {
t.Errorf("expected %x got %x", exp, hash)
}
}