Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 364 for Cmp (0.02 sec)

  1. staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation_encryption_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package validation
    
    import (
    	"fmt"
    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/sets"
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	"k8s.io/apiserver/pkg/apis/apiserver"
    )
    
    func TestStructure(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 20:54:24 UTC 2023
    - 33.7K bytes
    - Viewed (0)
  2. src/slices/slices.go

    // pair of elements.
    // The result is the first non-zero result of cmp; if cmp always
    // returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2),
    // and +1 if len(s1) > len(s2).
    func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int {
    	for i, v1 := range s1 {
    		if i >= len(s2) {
    			return +1
    		}
    		v2 := s2[i]
    		if c := cmp(v1, v2); c != 0 {
    			return c
    		}
    	}
    	if len(s1) < len(s2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. src/cmd/trace/goroutines.go

    		if _, ok := validNonOverlappingStats[sortBy]; ok {
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    				return cmp.Compare(b.NonOverlappingStats[sortBy], a.NonOverlappingStats[sortBy])
    			})
    		} else {
    			// Sort by total time by default.
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    				return cmp.Compare(b.TotalTime, a.TotalTime)
    			})
    		}
    
    		// Write down all the non-overlapping stats and sort them.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. pkg/controller/garbagecollector/dump_test.go

    limitations under the License.
    */
    
    package garbagecollector
    
    import (
    	"bytes"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/types"
    	"k8s.io/apimachinery/pkg/util/dump"
    )
    
    var (
    	alphaNode = func() *node {
    		return &node{
    			identity: objectReference{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 14 00:05:53 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/noderesources/requested_to_capacity_ratio_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package noderesources
    
    import (
    	"context"
    	"fmt"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    	"github.com/stretchr/testify/assert"
    	v1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/util/validation/field"
    	"k8s.io/klog/v2/ktesting"
    	"k8s.io/kubernetes/pkg/scheduler/apis/config"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/webhook_converter_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package conversion
    
    import (
    	"reflect"
    	"strings"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/validation"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 19.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

    limitations under the License.
    */
    
    package testing
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"path"
    	"reflect"
    	"sync"
    	"sync/atomic"
    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	"k8s.io/apimachinery/pkg/api/meta"
    	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/wait"
    	"k8s.io/apimachinery/pkg/watch"
    	"k8s.io/apiserver/pkg/apis/example"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 07:26:55 UTC 2024
    - 10.3K bytes
    - Viewed (1)
  8. pilot/pkg/model/service.go

    // code is specific to individual proxy implementations
    
    package model
    
    import (
    	"fmt"
    	"net/netip"
    	"sort"
    	"strconv"
    	"strings"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	"github.com/google/go-cmp/cmp/cmpopts"
    	"github.com/mitchellh/copystructure"
    	"google.golang.org/protobuf/proto"
    	"k8s.io/apimachinery/pkg/types"
    
    	"istio.io/api/label"
    	"istio.io/istio/pilot/pkg/features"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 46.3K bytes
    - Viewed (0)
  9. pilot/pkg/networking/util/util_test.go

    	cloned2 := CloneClusterLoadAssignment(testCla)
    	if !cmp.Equal(testCla, cloned, protocmp.Transform()) {
    		t.Fatalf("expected %v to be the same as %v", testCla, cloned)
    	}
    	cloned.ClusterName = "foo"
    	cloned.Endpoints[0].LbEndpoints[0].LoadBalancingWeight.Value = 5
    	if cmp.Equal(testCla, cloned, protocmp.Transform()) {
    		t.Fatalf("expected %v to be the different from %v", testCla, cloned)
    	}
    	if !cmp.Equal(testCla, cloned2, protocmp.Transform()) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 01:17:58 UTC 2024
    - 40K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go

    	"testing"
    
    	//nolint:staticcheck //iccheck // SA1019 Keep using deprecated module; it still seems to be maintained and the api of the recommended replacement differs
    	"github.com/golang/protobuf/proto"
    	"github.com/google/go-cmp/cmp"
    	fuzz "github.com/google/gofuzz"
    	flag "github.com/spf13/pflag"
    
    	apitesting "k8s.io/apimachinery/pkg/api/apitesting"
    	"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
    	apiequality "k8s.io/apimachinery/pkg/api/equality"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 16.8K bytes
    - Viewed (0)
Back to top