notation/debug_test.go

22 lines
372 B
Go
Raw Permalink Normal View History

package notation
import (
"fmt"
"reflect"
"testing"
)
func TestDebugNode(t *testing.T) {
const expect = `"foobarbaz"`
o := "foobarbaz"
2020-11-23 00:46:14 +01:00
n := reflectValue(none, &pending{values: make(map[uintptr]nodeRef)}, reflect.ValueOf(o))
s := fmt.Sprint(n)
if s != expect {
t.Fatalf(
"failed to get debug string of node, got: %s, expected: %s",
s,
expect,
)
}
}