Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 55 for roundTrip (1.93 sec)

  1. src/encoding/json/encode_test.go

    	NumberStr  Number  `json:",string"`
    }
    
    func TestRoundtripStringTag(t *testing.T) {
    	tests := []struct {
    		CaseName
    		in   StringTag
    		want string // empty to just test that we roundtrip
    	}{{
    		CaseName: Name("AllTypes"),
    		in: StringTag{
    			BoolStr:    true,
    			IntStr:     42,
    			UintptrStr: 44,
    			StrStr:     "xzbit",
    			NumberStr:  "46",
    		},
    		want: `{
    	"BoolStr": "true",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package roundtrip
    
    import (
    	"bytes"
    	gojson "encoding/json"
    	"io/ioutil"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"reflect"
    	"sort"
    	"strings"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 16:38:32 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  3. src/encoding/json/stream_test.go

    		t.Errorf("Marshal error: %v", err)
    	}
    
    	var got Data
    	if err := Unmarshal(buf.Bytes(), &got); err != nil {
    		t.Errorf("Unmarshal error: %v", err)
    	}
    	if got != want {
    		t.Errorf("Marshal/Unmarshal roundtrip:\n\tgot:  %v\n\twant: %v", got, want)
    	}
    }
    
    var streamEncodedIndent = `0.1
    "hello"
    null
    true
    false
    [
    >."a",
    >."b",
    >."c"
    >]
    {
    >."ß": "long s",
    >."K": "Kelvin"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 16:00:37 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/lstm.mlir

    // RUN: flatbuffer_translate -mlir-to-tflite-flatbuffer %s -o - | flatbuffer_translate --tflite-flatbuffer-to-mlir - -o - | FileCheck %s
    // Ensure lstm roundtrip exactly
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  5. pkg/apis/core/fuzzer/fuzzer.go

    			*rp = policies[c.Rand.Intn(len(policies))]
    		},
    		// core.DownwardAPIVolumeFile needs to have a specific func since FieldRef has to be
    		// defaulted to a version otherwise roundtrip will fail
    		func(m *core.DownwardAPIVolumeFile, c fuzz.Continue) {
    			m.Path = c.RandString()
    			versions := []string{"v1"}
    			m.FieldRef = &core.ObjectFieldSelector{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  6. cmd/object-api-utils.go

    		}
    		// Will get index or nil if closed.
    		gotIdx = <-indexCh
    		return gotIdx
    	}
    }
    
    // compressSelfTest performs a self-test to ensure that compression
    // algorithms completes a roundtrip. If any algorithm
    // produces an incorrect checksum it fails with a hard error.
    //
    // compressSelfTest tries to catch any issue in the compression implementation
    // early instead of silently corrupting data.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 36.3K bytes
    - Viewed (0)
  7. cmd/xl-storage-format-v2_test.go

    	failOnErr(xl.AddVersion(fi))
    
    	fi.VersionID = mustGetUUID()
    	fi.DataDir = mustGetUUID()
    	fi.Data = data2
    	failOnErr(xl.AddVersion(fi))
    
    	serialized, err := xl.AppendTo(nil)
    	failOnErr(err)
    	// Roundtrip data
    	var xl2 xlMetaV2
    	failOnErr(xl2.Load(serialized))
    
    	// We should have one data entry
    	list, err := xl2.data.list()
    	failOnErr(err)
    	if len(list) != 2 {
    		t.Fatalf("want 1 entry, got %d", len(list))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Mar 08 17:50:48 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  8. pkg/apis/core/v1/conversion_test.go

    		if rc.Spec.Selector != nil {
    			delete(rc.Spec.Selector, "")
    		}
    		inputs = append(inputs, rc)
    	}
    
    	// Round-trip the input RCs before converting to RS.
    	for i := range inputs {
    		inputs[i] = roundTrip(t, inputs[i]).(*v1.ReplicationController)
    	}
    
    	for _, in := range inputs {
    		rs := &apps.ReplicaSet{}
    		// Use in.DeepCopy() to avoid sharing pointers with `in`.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 10 05:34:15 UTC 2023
    - 21.7K bytes
    - Viewed (0)
  9. cmd/object-api-utils_test.go

    			var decBuf bytes.Buffer
    			decRdr := s2.NewReader(&rdrBuf)
    			_, err = io.Copy(&decBuf, decRdr)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			if !bytes.Equal(tt.data, decBuf.Bytes()) {
    				t.Errorf("roundtrip failed\n\t%q\n\t%q", tt.data, decBuf.Bytes())
    			}
    		})
    	}
    }
    
    func Test_pathNeedsClean(t *testing.T) {
    	type pathTest struct {
    		path, result string
    	}
    
    	cleantests := []pathTest{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/github.com/google/pprof/profile/profile.go

    	// discouraged - see docs for the sample label field in profile.proto.  The
    	// main reason this unlikely state is tracked here is to make the
    	// decoding->encoding roundtrip not lossy. But we expect that the value
    	// slices present in this map are always of length 1.
    	Label map[string][]string
    	// NumLabel is a per-label-key map to values for numeric labels. See a note
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 22.3K bytes
    - Viewed (0)
Back to top