Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for TestHash (0.14 sec)

  1. src/cmd/go/internal/cache/hash_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package cache
    
    import (
    	"fmt"
    	"os"
    	"testing"
    )
    
    func TestHash(t *testing.T) {
    	oldSalt := hashSalt
    	hashSalt = nil
    	defer func() {
    		hashSalt = oldSalt
    	}()
    
    	h := NewHash("alice")
    	h.Write([]byte("hello world"))
    	sum := fmt.Sprintf("%x", h.Sum())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 19:12:23 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/pubkeypin/pubkeypin_test.go

    	}
    	err = s.Allow(hashes...)
    	if err != nil || len(s.sha256Hashes) != 2 {
    		t.Error("expected allowing multiple hashes to succeed")
    		return
    	}
    }
    
    func TestHash(t *testing.T) {
    	actualHash := Hash(testCert(t, testCertPEM))
    	if actualHash != expectedHash {
    		t.Errorf(
    			"failed to Hash() to the expected value\n\texpected: %q\n\t  actual: %q",
    			expectedHash,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 13 11:38:39 UTC 2021
    - 5.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/tests/NamingTest.java

        }
    
    
        @Test
        @Ignore
        public void testWhitespaceSuffix () throws Exception {
            runFilenameTest("wssuffix ");
        }
    
    
        @Test
        @Ignore
        public void testHash () throws Exception {
            runFilenameTest("hash#tag");
        }
    
    
        private void runFilenameTest ( String... names ) throws CIFSException, UnknownHostException, MalformedURLException {
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sat Jun 06 10:48:05 UTC 2020
    - 7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

                  @Override
                  public byte[] getResult() {
                    return out.toByteArray();
                  }
                });
    
        assertExpectedBytes(readBytes);
      }
    
      public void testHash() throws IOException {
        HashCode expectedHash = Hashing.md5().hashBytes(expected);
        assertEquals(expectedHash, source.hash(Hashing.md5()));
      }
    
      public void testSlice_illegalArguments() {
        assertThrows(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

                return null;
              }
            };
    
        source.read(processor);
        assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
      }
    
      public void testHash() throws IOException {
        ByteSource byteSource = new TestByteSource("hamburger\n".getBytes(Charsets.US_ASCII));
    
        // Pasted this expected string from `echo hamburger | md5sum`
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  6. operator/pkg/object/objects_test.go

    	"strings"
    	"testing"
    
    	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
    	k8syaml "k8s.io/apimachinery/pkg/util/yaml"
    
    	"istio.io/istio/operator/pkg/util"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestHash(t *testing.T) {
    	hashTests := []struct {
    		desc      string
    		kind      string
    		namespace string
    		name      string
    		want      string
    	}{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 21 07:16:46 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/FilesTest.java

        Files.readLines(temp, Charsets.UTF_8, collectNonEmptyLines);
        assertThat(collectNonEmptyLines.getResult()).containsExactly("hello", " world  ").inOrder();
    
        assertTrue(temp.delete());
      }
    
      public void testHash() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
    
        String init = "d41d8cd98f00b204e9800998ecf8427e";
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/FilesTest.java

        Files.readLines(temp, Charsets.UTF_8, collectNonEmptyLines);
        assertThat(collectNonEmptyLines.getResult()).containsExactly("hello", " world  ").inOrder();
    
        assertTrue(temp.delete());
      }
    
      public void testHash() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
    
        String init = "d41d8cd98f00b204e9800998ecf8427e";
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.2K bytes
    - Viewed (0)
  9. src/crypto/sha512/sha512_test.go

    	},
    }
    
    func testHash(t *testing.T, name, in, outHex string, oneShotResult []byte, digestFunc hash.Hash) {
    	if calculated := hex.EncodeToString(oneShotResult); calculated != outHex {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 21:17:08 UTC 2023
    - 105.6K bytes
    - Viewed (0)
  10. src/testing/fstest/testfs_test.go

    	if err := os.Symlink(filepath.Join(tmp, "hello"), filepath.Join(tmp, "hello.link")); err != nil {
    		t.Fatal(err)
    	}
    
    	if err := TestFS(tmpfs, "hello", "hello.link"); err != nil {
    		t.Fatal(err)
    	}
    }
    
    func TestDash(t *testing.T) {
    	m := MapFS{
    		"a-b/a": {Data: []byte("a-b/a")},
    	}
    	if err := TestFS(m, "a-b/a"); err != nil {
    		t.Error(err)
    	}
    }
    
    type shuffledFS MapFS
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top