utility: Added tests.

pull/3/head
Dustin Oprea 2018-05-03 12:59:12 -04:00
parent c408aa04d0
commit a9c16ec9ef
1 changed files with 21 additions and 0 deletions

21
utility_test.go Normal file
View File

@ -0,0 +1,21 @@
package exif
import (
"testing"
)
func TestDumpBytesToString(t *testing.T) {
s := DumpBytesToString([]byte { 0x12, 0x34, 0x56 })
if s != "12 34 56" {
t.Fatalf("result not expected")
}
}
func TestDumpBytesClauseToString(t *testing.T) {
s := DumpBytesClauseToString([]byte { 0x12, 0x34, 0x56 })
if s != "0x12, 0x34, 0x56" {
t.Fatalf("result not expected")
}
}