MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestConfigure_Platform

Function TestConfigure_Platform

cmds/cmd_configure_test.go:277–300  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

275}
276
277func TestConfigure_Platform(t *testing.T) {
278 celer := newInitializedCeler(t)
279 cmd := &configureCmd{}
280
281 var (
282 windowsPlatform = expr.If(os.Getenv("GITHUB_ACTIONS") == "true", "x86_64-windows-msvc-enterprise-14", "x86_64-windows-msvc-community-14")
283 platform = expr.If(runtime.GOOS == "windows", windowsPlatform, "x86_64-linux-ubuntu-22.04-gcc-11.5.0")
284 )
285
286 if _, err := runCommand(t, cmd.Command(celer), "--platform="+platform); err != nil {
287 t.Fatal(err)
288 }
289 if celer.Platform().GetName() != platform {
290 t.Fatalf("platform should be `%s`", platform)
291 }
292
293 celer2 := configs.NewCeler()
294 if err := celer2.Init(); err != nil {
295 t.Fatal(err)
296 }
297 if celer2.Platform().GetName() != platform {
298 t.Fatalf("platform should be `%s`", platform)
299 }
300}
301
302func TestConfigure_Project(t *testing.T) {
303 celer := newInitializedCeler(t)

Callers

nothing calls this directly

Calls 9

CommandMethod · 0.95
InitMethod · 0.95
PlatformMethod · 0.95
IfFunction · 0.92
NewCelerFunction · 0.92
newInitializedCelerFunction · 0.85
runCommandFunction · 0.85
GetNameMethod · 0.65
PlatformMethod · 0.65

Tested by

no test coverage detected