Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Dmytrenko <rdmytrenko@gmail.com>
  • Loading branch information
StevenACoffman and erka committed May 27, 2024
1 parent bc0a420 commit 7dddf3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions codegen/testserver/followschema/interfaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ func TestInterfaces(t *testing.T) {
`, &resp)

require.Len(t, resp.Shapes, 2)
require.InEpsilon(t, float64(-1), resp.Shapes[0].Coordinates.X, 0.02)
require.InEpsilon(t, float64(0), resp.Shapes[0].Coordinates.Y, 0.02)
require.InEpsilon(t, float64(1), resp.Shapes[1].Coordinates.X, 0.02)
require.InEpsilon(t, float64(1), resp.Shapes[1].Coordinates.Y, 0.02)
require.InDelta(t, float64(-1), resp.Shapes[0].Coordinates.X, 0.02)
require.InDelta(t, float64(0), resp.Shapes[0].Coordinates.Y, 0.02)
require.InDelta(t, float64(1), resp.Shapes[1].Coordinates.X, 0.02)
require.InDelta(t, float64(1), resp.Shapes[1].Coordinates.Y, 0.02)
})

t.Run("fragment on interface must return merged fields", func(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions codegen/testserver/singlefile/interfaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ func TestInterfaces(t *testing.T) {
`, &resp)

require.Len(t, resp.Shapes, 2)
require.InEpsilon(t, float64(-1), resp.Shapes[0].Coordinates.X, 0.02)
require.InEpsilon(t, float64(0), resp.Shapes[0].Coordinates.Y, 0.02)
require.InEpsilon(t, float64(1), resp.Shapes[1].Coordinates.X, 0.02)
require.InEpsilon(t, float64(1), resp.Shapes[1].Coordinates.Y, 0.02)
require.InDelta(t, float64(-1), resp.Shapes[0].Coordinates.X, 0.02)
require.InDelta(t, float64(0), resp.Shapes[0].Coordinates.Y, 0.02)
require.InDelta(t, float64(1), resp.Shapes[1].Coordinates.X, 0.02)
require.InDelta(t, float64(1), resp.Shapes[1].Coordinates.Y, 0.02)
})

t.Run("fragment on interface must return merged fields", func(t *testing.T) {
Expand Down

0 comments on commit 7dddf3b

Please sign in to comment.