github.com/matiasanaya/gqlgen@v0.6.0/codegen/import_test.go (about) 1 package codegen 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 func TestDeterministicDecollisioning(t *testing.T) { 10 a := Imports{ 11 imports: []*Import{ 12 {Name: "types", Path: "foobar/types"}, 13 {Name: "types", Path: "bazfoo/types"}, 14 }, 15 }.finalize() 16 17 b := Imports{ 18 imports: []*Import{ 19 {Name: "types", Path: "bazfoo/types"}, 20 {Name: "types", Path: "foobar/types"}, 21 }, 22 }.finalize() 23 24 require.EqualValues(t, a, b) 25 }