INNER CODE UNIT · Go
newTestCommand
gameknife/gkNextEngine · tools/gnb/cmd/gnb/main.go:574
func newTestCommand(ctx appContext) *cobra.Command {
listTests := false
listTags := false
cmd := &cobra.Command{
Use: "test [filter]",
Short: "Run Catch2 unit tests",
Args: cobra.ArbitraryArgs,
RunE: func(cmd *cobra.Command, args []string) error {
runArgs := append([]string{}, args...)
if listTests {
runArgs = append(runArgs, "--list-tests")
}
if listTags {
runArgs = append(runArgs, "--list-tags")
}
return runner.Run(ctx.repoRoot, runner.Options{Target: "gkNextUnitTests", Preset: ctx.preset, Args: runArgs})
},
}