aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-17 20:24:12 +0800
committerobscuren <geffobscura@gmail.com>2015-03-17 20:24:25 +0800
commit0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa (patch)
tree9d4b05ed91f007c0831033c35f80dff691a4c7e7 /common
parentff55c6f5badda7ef11c38ef5d94b71420b14817c (diff)
downloaddexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar.gz
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar.bz2
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar.lz
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar.xz
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.tar.zst
dexon-0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa.zip
Fixed VM & Tests w/ conversion
Diffstat (limited to 'common')
-rw-r--r--common/types_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/types_test.go b/common/types_test.go
new file mode 100644
index 000000000..9f303152c
--- /dev/null
+++ b/common/types_test.go
@@ -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)
+ }
+}