Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestYaptest: use Gopo_xxx to make it more friendly #1720

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cl/compile_gop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ var c Class
var a int

func main() {
test.Gopt_Case_Match__1(c, a, "b")
test.Gopt_Case_MatchAny(c, a, "b")
}
`)
}
Expand Down
14 changes: 5 additions & 9 deletions cl/internal/test/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ type Case struct {
CaseT
}

func Gopt_Case_Equal__0[T basetype](t CaseT, a, b T) bool {
return a == b
}

func Gopt_Case_Equal__1(t CaseT, a, b any) bool {
return true
}
const (
Gopo_Gopt_Case_Match = "Gopt_Case_MatchTBase,Gopt_Case_MatchAny"
)

func Gopt_Case_Match__0[T basetype](t CaseT, got, expected T, name ...string) {
func Gopt_Case_MatchTBase[T basetype](t CaseT, got, expected T, name ...string) {
}

func Gopt_Case_Match__1(t CaseT, got, expected any, name ...string) {
func Gopt_Case_MatchAny(t CaseT, got, expected any, name ...string) {
}
Loading