Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TestRoundTrip (0.21 sec)

  1. src/vendor/golang.org/x/net/nettest/conntest.go

    			}
    		}
    	} else {
    		t.Errorf("got %T: %v, want net.Error", err, err)
    	}
    }
    
    // testRoundtrip writes something into c and reads it back.
    // It assumes that everything written into c is echoed back to itself.
    func testRoundtrip(t *testing.T, c net.Conn) {
    	t.Helper()
    	if err := c.SetDeadline(neverTimeout); err != nil {
    		t.Errorf("roundtrip SetDeadline error: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/encoding/pem/pem_test.go

    			return false
    		}
    		return true
    	}
    
    	// Explicitly test the empty block.
    	if !testRoundtrip(Block{
    		Type:    "EMPTY",
    		Headers: make(map[string]string),
    		Bytes:   []byte{},
    	}) {
    		return
    	}
    
    	quick.Check(testRoundtrip, nil)
    }
    
    func BenchmarkEncode(b *testing.B) {
    	data := &Block{Bytes: make([]byte, 65536)}
    	b.SetBytes(int64(len(data.Bytes)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 22:56:00 UTC 2022
    - 23.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        HashCode hash1 = Hashing.sha1().hashString("foo", Charsets.US_ASCII);
        HashCode hash2 = HashCode.fromString(hash1.toString());
        assertEquals(hash1, hash2);
      }
    
      public void testRoundTrip() {
        for (ExpectedHashCode expected : expectedHashCodes) {
          String string = HashCode.fromBytes(expected.bytes).toString();
          assertEquals(expected.toString, string);
          assertEquals(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go

    	"k8s.io/apimachinery/pkg/util/json"
    	"k8s.io/apimachinery/pkg/util/sets"
    	celconfig "k8s.io/apiserver/pkg/apis/cel"
    )
    
    // TestRoundTrip checks the conversion to go-openapi types.
    // internal -> go-openapi -> JSON -> external -> internal
    func TestRoundTrip(t *testing.T) {
    	scheme := runtime.NewScheme()
    	codecs := serializer.NewCodecFactory(scheme)
    
    	// add internal and external types to scheme
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 04:49:59 UTC 2023
    - 24.8K bytes
    - Viewed (0)
  5. maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java

            assertEquals(2, target.getVersioning().getSnapshot().getBuildNumber());
        }
        /*-- END test "groupId/artifactId/version" metadata ---*/
    
        @Test
        void testRoundtrip() throws Exception {
            System.setProperty(XMLInputFactory.class.getName(), WstxInputFactory.class.getName());
            System.setProperty(XMLOutputFactory.class.getName(), WstxOutputFactory.class.getName());
    
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Fri Apr 12 10:50:18 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  6. src/encoding/xml/xml_test.go

    		t.Fatalf("lost tokens: %#v", tokens)
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	tests := map[string]string{
    		"trailing colon":         `<foo abc:="x"></foo>`,
    		"comments in directives": `<!ENTITY x<!<!-- c1 [ " -->--x --> > <e></e> <!DOCTYPE xxx [ x<!-- c2 " -->--x ]>`,
    	}
    	for name, input := range tests {
    		t.Run(name, func(t *testing.T) { testRoundTrip(t, input) })
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  7. src/crypto/internal/mlkem768/mlkem768_test.go

    		exp := new(big.Int).Exp(ΞΆ, big.NewInt(int64(BitRev7(uint8(k)))*2+1), q)
    		if big.NewInt(int64(gamma)).Cmp(exp) != 0 {
    			t.Errorf("gammas[%d] = %v, expected %v", k, gamma, exp)
    		}
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	dk, err := GenerateKey()
    	if err != nil {
    		t.Fatal(err)
    	}
    	c, Ke, err := Encapsulate(dk.EncapsulationKey())
    	if err != nil {
    		t.Fatal(err)
    	}
    	Kd, err := Decapsulate(dk, c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 15:27:18 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. pkg/api/testing/unstructured_test.go

    		t.Errorf("FromUnstructured failed: %v", err)
    		return
    	}
    
    	if !apiequality.Semantic.DeepEqual(item, newObj) {
    		t.Errorf("Object changed, diff: %v", cmp.Diff(item, newObj))
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	for gvk := range legacyscheme.Scheme.AllKnownTypes() {
    		if nonRoundTrippableTypes.Has(gvk.Kind) {
    			continue
    		}
    		if gvk.Version == runtime.APIVersionInternal {
    			continue
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go

    	if err != nil {
    		t.Errorf("FromUnstructured failed: %v", err)
    		return
    	}
    
    	if !reflect.DeepEqual(item, newObj) {
    		t.Errorf("Object changed, diff: %v", cmp.Diff(item, newObj))
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	intVal := int64(42)
    	testCases := []struct {
    		obj interface{}
    	}{
    		{
    			obj: &unstructured.UnstructuredList{
    				Object: map[string]interface{}{
    					"kind": "List",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 22.9K bytes
    - Viewed (0)
  10. src/strconv/atof_test.go

    	// thread with 80-bit precision and the Go runtime didn't
    	// fix the FP control word.
    	{8865794286000691 << 39, "4.87402195346389e+27"},
    	{8865794286000692 << 39, "4.8740219534638903e+27"},
    }
    
    func TestRoundTrip(t *testing.T) {
    	for _, tt := range roundTripCases {
    		old := SetOptimize(false)
    		s := FormatFloat(tt.f, 'g', -1, 64)
    		if s != tt.s {
    			t.Errorf("no-opt FormatFloat(%b) = %s, want %s", tt.f, s, tt.s)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 16:24:57 UTC 2022
    - 23.6K bytes
    - Viewed (0)
Back to top