notation/debug_test.go
2020-11-22 23:22:20 +01:00

22 lines
373 B
Go

package notation
import (
"fmt"
"reflect"
"testing"
)
func TestDebugNode(t *testing.T) {
const expect = `"foobarbaz"`
o := "foobarbaz"
n := reflectValue(none, &pending{values: make(map[valueKey]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,
)
}
}