Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for testKey1 (0.25 sec)

  1. src/os/env_test.go

    		}
    	}(Environ())
    
    	if err := Setenv(testKey, testValue); err != nil {
    		t.Fatalf("Setenv(%q, %q) failed: %v", testKey, testValue, err)
    	}
    	if _, ok := LookupEnv(testKey); !ok {
    		t.Errorf("Setenv(%q, %q) didn't set $%s", testKey, testValue, testKey)
    	}
    	Clearenv()
    	if val, ok := LookupEnv(testKey); ok {
    		t.Errorf("Clearenv() didn't clear $%s, remained with value %q", testKey, val)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 04 15:31:54 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. cmd/sftp-server_test.go

    	if err != nil {
    		c.Fatalf("could not read test key file: %s", err)
    	}
    
    	testKey, _, _, _, err := ssh.ParseAuthorizedKey(keyBytes)
    	if err != nil {
    		c.Fatalf("could not parse test key file: %s", err)
    	}
    
    	newSSHCon := newSSHConnMock("dillon=ldap")
    	_, err = sshPubKeyAuth(newSSHCon, testKey)
    	if err == nil || !errors.Is(err, errAuthentication) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/test_cache_inputs.txt

    # should invalidate cached test results.
    env TESTKEY=x
    go test testcache -run=TestLookupEnv
    go test testcache -run=TestLookupEnv
    stdout '\(cached\)'
    
    # GODEBUG is always read
    env GODEBUG=asdf=1
    go test testcache -run=TestLookupEnv
    ! stdout '\(cached\)'
    go test testcache -run=TestLookupEnv
    stdout '\(cached\)'
    env GODEBUG=
    
    env TESTKEY=y
    go test testcache -run=TestLookupEnv
    ! stdout '\(cached\)'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 22:23:53 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. test/typeparam/mapsimp.dir/main.go

    package main
    
    import (
    	"./a"
    	"fmt"
    	"math"
    	"sort"
    )
    
    var m1 = map[int]int{1: 2, 2: 4, 4: 8, 8: 16}
    var m2 = map[int]string{1: "2", 2: "4", 4: "8", 8: "16"}
    
    func TestKeys() {
    	want := []int{1, 2, 4, 8}
    
    	got1 := a.Keys(m1)
    	sort.Ints(got1)
    	if !a.SliceEqual(got1, want) {
    		panic(fmt.Sprintf("a.Keys(%v) = %v, want %v", m1, got1, want))
    	}
    
    	got2 := a.Keys(m2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  5. src/maps/iter_test.go

    			if !ok || v != v1 {
    				t.Errorf("at iteration %d got %d, %d want %d, %d", cnt, i, v, i, v1)
    			}
    			cnt++
    		}
    		if cnt != size {
    			t.Errorf("read %d values expected %d", cnt, size)
    		}
    	}
    }
    
    func TestKeys(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
    		for k := range Keys(m) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:44:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. test/typeparam/maps.go

    	for k, v := range m {
    		m[k] = f(v)
    	}
    }
    
    var m1 = map[int]int{1: 2, 2: 4, 4: 8, 8: 16}
    var m2 = map[int]string{1: "2", 2: "4", 4: "8", 8: "16"}
    
    func TestKeys() {
    	want := []int{1, 2, 4, 8}
    
    	got1 := _Keys(m1)
    	sort.Ints(got1)
    	if !_SliceEqual(got1, want) {
    		panic(fmt.Sprintf("_Keys(%v) = %v, want %v", m1, got1, want))
    	}
    
    	got2 := _Keys(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)
  7. guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class MultimapKeysTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      @CollectionSize.Require(SEVERAL)
      public void testKeys() {
        resetContainer(
            Helpers.mapEntry(k0(), v0()), Helpers.mapEntry(k0(), v1()), Helpers.mapEntry(k1(), v0()));
        Multiset<K> keys = multimap().keys();
        assertEquals(2, keys.count(k0()));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jan 09 20:10:38 UTC 2018
    - 4.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/etcd3/linearized_read_test.go

    	// detail ever changes.
    	// [1] https://etcd.io/docs/v3.5/learning/api_guarantees/#isolation-level-and-consistency-of-replicas
    	ctx, store, etcdClient := testSetup(t)
    
    	dir := "/testing"
    	key := dir + "/testkey"
    	out := &example.Pod{}
    	obj := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", SelfLink: "testlink"}}
    
    	if err := store.Create(ctx, key, obj, out, 0); err != nil {
    		t.Fatalf("Set failed: %v", err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 20:08:59 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class MultimapKeysTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> {
      @CollectionSize.Require(SEVERAL)
      public void testKeys() {
        resetContainer(
            Helpers.mapEntry(k0(), v0()), Helpers.mapEntry(k0(), v1()), Helpers.mapEntry(k1(), v0()));
        Multiset<K> keys = multimap().keys();
        assertEquals(2, keys.count(k0()));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jan 09 20:10:38 UTC 2018
    - 4.3K bytes
    - Viewed (0)
Back to top