Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for testValue3 (0.33 sec)

  1. guava-testlib/src/com/google/common/collect/testing/google/MultimapValuesTester.java

     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class MultimapValuesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      public void testValues() {
        List<V> expected = Lists.newArrayList();
        for (Entry<K, V> entry : getSampleElements()) {
          expected.add(entry.getValue());
        }
        assertEqualIgnoringOrder(expected, multimap().values());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jan 09 20:10:38 UTC 2018
    - 2.5K bytes
    - Viewed (0)
  2. src/maps/iter_test.go

    		var got []int
    		for k := range Keys(m) {
    			got = append(got, k)
    		}
    		slices.Sort(got)
    		if !slices.Equal(got, want) {
    			t.Errorf("Keys(%v) = %v, want %v", m, got, want)
    		}
    	}
    }
    
    func TestValues(t *testing.T) {
    	for size := 0; size < 10; size++ {
    		var want []int
    		m := make(map[int]int)
    		for i := range size {
    			m[i] = i
    			want = append(want, i)
    		}
    
    		var got []int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:44:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapValuesTester.java

     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class MultimapValuesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      public void testValues() {
        List<V> expected = Lists.newArrayList();
        for (Entry<K, V> entry : getSampleElements()) {
          expected.add(entry.getValue());
        }
        assertEqualIgnoringOrder(expected, multimap().values());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jan 09 20:10:38 UTC 2018
    - 2.5K bytes
    - Viewed (0)
  4. test/typeparam/maps.go

    	}
    
    	got2 := _Keys(m2)
    	sort.Ints(got2)
    	if !_SliceEqual(got2, want) {
    		panic(fmt.Sprintf("_Keys(%v) = %v, want %v", m2, got2, want))
    	}
    }
    
    func TestValues() {
    	got1 := _Values(m1)
    	want1 := []int{2, 4, 8, 16}
    	sort.Ints(got1)
    	if !_SliceEqual(got1, want1) {
    		panic(fmt.Sprintf("_Values(%v) = %v, want %v", m1, got1, want1))
    	}
    
    	got2 := _Values(m2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/cel/types_test.go

    	}
    	expT, err := mp.ExprType()
    	if err != nil {
    		t.Errorf("fail to get cel type: %s", err)
    	}
    	if expT.GetMapType() == nil {
    		t.Errorf("got %v, wanted CEL map type", expT)
    	}
    }
    
    func testValue(t *testing.T, id int64, val interface{}) *DynValue {
    	t.Helper()
    	dv, err := NewDynValue(id, val)
    	if err != nil {
    		t.Fatalf("NewDynValue(%d, %v) failed: %v", id, val, err)
    	}
    	return dv
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go

    	"k8s.io/apimachinery/pkg/util/json"
    	"k8s.io/client-go/kubernetes/scheme"
    )
    
    var testData = TestStruct{
    	TypeMeta:   metav1.TypeMeta{APIVersion: "foo/bar", Kind: "TestStruct"},
    	Key:        "testValue",
    	Map:        map[string]int{"TestSubkey": 1},
    	StringList: []string{"a", "b", "c"},
    	IntList:    []int{1, 2, 3},
    }
    
    type TestStruct struct {
    	metav1.TypeMeta   `json:",inline"`
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 4K bytes
    - Viewed (0)
  7. src/slices/iter_test.go

    				t.Errorf("at iteration %d got %d, %d want %d, %d", cnt, i, v, ei, ev)
    			}
    			ei--
    			ev--
    			cnt++
    		}
    		if cnt != size {
    			t.Errorf("read %d values expected %d", cnt, size)
    		}
    	}
    }
    
    func TestValues(t *testing.T) {
    	for size := 0; size < 10; size++ {
    		var s []int
    		for i := range size {
    			s = append(s, i)
    		}
    		ev := 0
    		cnt := 0
    		for v := range Values(s) {
    			if v != ev {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  8. src/sync/atomic/value_test.go

    // license that can be found in the LICENSE file.
    
    package atomic_test
    
    import (
    	"math/rand"
    	"runtime"
    	"strconv"
    	"sync"
    	"sync/atomic"
    	. "sync/atomic"
    	"testing"
    )
    
    func TestValue(t *testing.T) {
    	var v Value
    	if v.Load() != nil {
    		t.Fatal("initial Value is not nil")
    	}
    	v.Store(42)
    	x := v.Load()
    	if xx, ok := x.(int); !ok || xx != 42 {
    		t.Fatalf("wrong value: got %+v, want 42", x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6.1K bytes
    - Viewed (0)
Back to top