Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for TestMmap (0.31 sec)

  1. src/cmd/link/internal/ld/outbuf_test.go

    // license that can be found in the LICENSE file.
    
    package ld
    
    import (
    	"path/filepath"
    	"runtime"
    	"testing"
    )
    
    // TestMMap ensures that we can actually mmap on every supported platform.
    func TestMMap(t *testing.T) {
    	switch runtime.GOOS {
    	default:
    		t.Skip("unsupported OS")
    	case "aix", "darwin", "ios", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "windows":
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 08 20:03:01 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  2. src/syscall/mmap_unix_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix
    
    package syscall_test
    
    import (
    	"syscall"
    	"testing"
    )
    
    func TestMmap(t *testing.T) {
    	b, err := syscall.Mmap(-1, 0, syscall.Getpagesize(), syscall.PROT_NONE, syscall.MAP_ANON|syscall.MAP_PRIVATE)
    	if err != nil {
    		t.Fatalf("Mmap: %v", err)
    	}
    	if err := syscall.Munmap(b); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 23:58:34 UTC 2022
    - 500 bytes
    - Viewed (0)
  3. operator/pkg/util/reflect_test.go

    func TestIsValueFuncs(t *testing.T) {
    	testInt := int(42)
    	testStruct := struct{}{}
    	testSlice := []bool{}
    	testMap := map[bool]bool{}
    	var testNilSlice []bool
    	var testNilMap map[bool]bool
    
    	allValues := []any{nil, testInt, &testInt, testStruct, &testStruct, testNilSlice, testSlice, &testSlice, testNilMap, testMap, &testMap}
    
    	tests := []struct {
    		desc     string
    		function func(v reflect.Value) bool
    		okValues []any
    	}{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 10.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/SynchronizedNavigableMapTest.java

          return super.setValue(value);
        }
    
        private static final long serialVersionUID = 0;
      }
    
      static class TestMap<K, V> extends SynchronizedMapTest.TestMap<K, V>
          implements NavigableMap<K, V> {
    
        public TestMap(NavigableMap<K, V> delegate, Object mutex) {
          super(delegate, mutex);
        }
    
        @Override
        protected NavigableMap<K, V> delegate() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  5. test/typeparam/orderedmapsimp.dir/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"bytes"
    	"fmt"
    )
    
    func TestMap() {
    	m := a.New[[]byte, int](bytes.Compare)
    
    	if _, found := m.Find([]byte("a")); found {
    		panic(fmt.Sprintf("unexpectedly found %q in empty map", []byte("a")))
    	}
    
    	for _, c := range []int{'a', 'c', 'b'} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/test/testdata/map_test.go

    	}
    }
    
    func testLenNilMap(t *testing.T) {
    
    	var v map[int]int
    	if want, got := 0, lenMap_ssa(v); got != want {
    		t.Errorf("expected len(nil) = %d, got %d", want, got)
    	}
    }
    func TestMap(t *testing.T) {
    	testLenMap(t)
    	testLenNilMap(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 721 bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go

    	NamedStr  namedString       `json:"namedStr,omitempty"`
    	NamedBool namedBool         `json:"namedBool,omitempty"`
    	Foobar    bar               `json:"foobar,omitempty"`
    	Testmap   map[string]string `json:"testmap,omitempty"`
    }
    
    func (obj *foo) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
    
    type baz struct {
    	Ptr  *int  `json:"ptr"`
    	Bptr *bool `json:"bptr,omitempty"`
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 03 07:01:02 UTC 2018
    - 6.2K bytes
    - Viewed (0)
  8. test/typeparam/sliceimp.dir/main.go

    	}
    
    	s3 := []string{"a", "b", "c"}
    	s4 := []string{"A", "B", "C"}
    	if !a.EqualFn(s3, s4, strings.EqualFold) {
    		panic(fmt.Sprintf("a.EqualFn(%v, %v, strings.EqualFold) = false, want true", s3, s4))
    	}
    }
    
    func TestMap() {
    	s1 := []int{1, 2, 3}
    	s2 := a.Map(s1, func(i int) float64 { return float64(i) * 2.5 })
    	if want := []float64{2.5, 5, 7.5}; !a.Equal(s2, want) {
    		panic(fmt.Sprintf("a.Map(%v, ...) = %v, want %v", s1, s2, want))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 4.6K bytes
    - Viewed (0)
  9. test/typeparam/slices.go

    	s3 := []string{"a", "b", "c"}
    	s4 := []string{"A", "B", "C"}
    	if !_EqualFn(s3, s4, strings.EqualFold) {
    		panic(fmt.Sprintf("_EqualFn(%v, %v, strings.EqualFold) = false, want true", s3, s4))
    	}
    }
    
    func TestMap() {
    	s1 := []int{1, 2, 3}
    	s2 := _Map(s1, func(i int) float64 { return float64(i) * 2.5 })
    	if want := []float64{2.5, 5, 7.5}; !_Equal(s2, want) {
    		panic(fmt.Sprintf("_Map(%v, ...) = %v, want %v", s1, s2, want))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 7.8K bytes
    - Viewed (0)
  10. test/range.go

    }
    
    // test that range over map only evaluates
    // the expression after "range" once.
    
    func makemap() map[int]int {
    	nmake++
    	return map[int]int{0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: '☺'}
    }
    
    func testmap() {
    	s := 0
    	nmake = 0
    	for _, v := range makemap() {
    		s += v
    	}
    	if nmake != 1 {
    		println("range called makemap", nmake, "times")
    		panic("fail")
    	}
    	if s != 'a'+'b'+'c'+'d'+'☺' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 05:50:54 UTC 2017
    - 8.1K bytes
    - Viewed (0)
Back to top