Skip to content

Commit

Permalink
node_test: fix for use with yaml
Browse files Browse the repository at this point in the history
This yaml.Unmarshal call unmarshals dates with quotes, so let's change
the test representation to match.
  • Loading branch information
kevinburkesegment committed Jul 22, 2022
1 parent 5e9c00a commit 6f4351c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func TestNodeString(t *testing.T) {
node: Scalar{reflect.ValueOf("Hello World!")},
},
{
repr: `2016-12-31T23:42:59Z`,
repr: `"2016-12-31T23:42:59Z"`,
node: Scalar{reflect.ValueOf(date)},
},
{
Expand Down Expand Up @@ -374,8 +374,8 @@ func TestNodeString(t *testing.T) {
t.Run(test.repr, func(t *testing.T) {
if repr := test.node.String(); repr != test.repr {
t.Error("representation mismatch")
t.Log("expected:", test.repr)
t.Log("found: ", repr)
t.Logf("want: %v, %#v", reflect.TypeOf(test.repr), test.repr)
t.Logf("got: %v, %#v", reflect.TypeOf(repr), repr)
}
})
}
Expand Down

0 comments on commit 6f4351c

Please sign in to comment.