Files
EdgeAPI/internal/utils/compare_test.go

40 lines
629 B
Go
Raw Permalink Normal View History

2024-07-27 14:15:25 +08:00
// Copyright 2022 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
2022-09-24 14:07:19 +08:00
package utils_test
import (
"testing"
2024-07-27 14:15:25 +08:00
"github.com/TeaOSLab/EdgeAPI/internal/utils"
2022-09-24 14:07:19 +08:00
)
func TestEqualConfig(t *testing.T) {
type testType struct {
Name string `json:"name"`
Age int `json:"age"`
}
{
var c1 = &testType{
Name: "Lily",
Age: 12,
}
var c2 = &testType{
Name: "Lucy",
Age: 12,
}
t.Log(utils.EqualConfig(c1, c2))
}
{
var c1 = &testType{
Name: "Lily",
Age: 12,
}
var c2 = &testType{
Age: 12,
Name: "Lily",
}
t.Log(utils.EqualConfig(c1, c2))
}
}