- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 4,301 for main2 (0.1 sec)
-
test/typeparam/valimp.dir/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "./a" "fmt" ) func main() { var v1 a.Value[int] a.Set(&v1, 1) if got, want := a.Get(&v1), 1; got != want { panic(fmt.Sprintf("Get() == %d, want %d", got, want)) } v1.Set(2) if got, want := v1.Get(), 2; got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 1.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/go2c2go/m1/main.go
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main // extern int CFunc(void); import "C" import ( "fmt" "os" ) func main() { got := C.CFunc() const want = (1 << 8) | 2 if got != want { fmt.Printf("got %#x, want %#x\n", got, want) os.Exit(1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 380 bytes - Viewed (0) -
test/typeparam/issue51250a.dir/main.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "./a" "./b" ) func main() { switch b.I.(type) { case a.G[b.T]: case int: panic("bad") case float64: panic("bad") default: panic("bad") } b.F(a.G[b.T]{})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 03 00:23:02 UTC 2022 - 355 bytes - Viewed (0) -
test/typeparam/issue48462.dir/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "reflect" "./a" ) func main() { e := []int{1, 2, 2, 3, 1, 6} got := a.Unique(e) want := []int{1, 2, 3, 6} if !reflect.DeepEqual(got, want) { panic(fmt.Sprintf("got %d, want %d", got, want)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 397 bytes - Viewed (0) -
test/fixedbugs/issue31959.dir/main.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 361 bytes - Viewed (0) -
src/cmd/link/internal/ld/testdata/issue10978/main.go
// license that can be found in the LICENSE file. package main func undefined() func defined1() int { // To check multiple errors for a single symbol, // reference undefined more than once. undefined() undefined() return 0 } func defined2() { undefined() undefined() } func init() { _ = defined1() defined2() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 05 16:49:07 UTC 2018 - 478 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue22295.pkg/main.go
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore package main import ( "log" "plugin" ) func main() { p, err := plugin.Open("issue.22295.so") if err != nil { log.Fatal(err) } f, err := p.Lookup("F") if err != nil { log.Fatal(err) } const want = 2503
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 486 bytes - Viewed (0) -
test/typeparam/select.dir/main.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "sort" "./a" ) func main() { c := make(chan int, 1) d := make(chan int, 1) c <- 5 d <- 6 var r [2]int r[0] = a.F(c, d) r[1] = a.F(c, d) sort.Ints(r[:]) if r != [2]int{5, 6} { panic("incorrect results")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 03 22:57:02 UTC 2021 - 408 bytes - Viewed (0) -
test/fixedbugs/issue21120.dir/main.go
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "os" "./a" "./b" ) func main() { // Make sure the reflect information for a.S is in the executable. _ = a.V() b1 := b.F1() b2 := b.F2() if b1 != b2 { fmt.Printf("%q (from b.F1()) != %q (from b.F2())\n", b1, b2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 24 18:05:00 UTC 2017 - 432 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue22175/main.go
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "fmt" "os" "plugin" ) func main() { p2, err := plugin.Open("issue22175_plugin1.so") if err != nil { panic(err) } f, err := p2.Lookup("F") if err != nil { panic(err) } got := f.(func() int)() const want = 971
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 510 bytes - Viewed (0)