Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestLess (0.1 sec)

  1. pkg/scheduler/framework/plugins/queuesort/priority_sort_test.go

    */
    
    package queuesort
    
    import (
    	"testing"
    	"time"
    
    	v1 "k8s.io/api/core/v1"
    	"k8s.io/kubernetes/pkg/scheduler/framework"
    	st "k8s.io/kubernetes/pkg/scheduler/testing"
    )
    
    func TestLess(t *testing.T) {
    	prioritySort := &PrioritySort{}
    	var lowPriority, highPriority = int32(10), int32(100)
    	t1 := time.Now()
    	t2 := t1.Add(time.Second)
    	for _, tt := range []struct {
    		name     string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 12 14:11:04 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  2. pkg/kubelet/types/types_test.go

    		if !reflect.DeepEqual(data.statuses, data.expected) {
    			t.Errorf(
    				"failed Swap:\n\texpected: %v\n\t  actual: %v",
    				data.expected,
    				data.statuses,
    			)
    		}
    	}
    }
    
    func TestLess(t *testing.T) {
    	var cases = []struct {
    		statuses SortedContainerStatuses
    		expected bool
    	}{
    		{
    			statuses: SortedContainerStatuses{{Name: "first"}, {Name: "second"}},
    			expected: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 19 08:28:25 UTC 2022
    - 6.2K bytes
    - Viewed (0)
  3. src/cmp/cmp_test.go

    	{negzero, negzero, 0},
    	{negzero, 0.0, 0},
    	{0.0, negzero, 0},
    	{negzero, 1.0, -1},
    	{negzero, -1.0, +1},
    	{nilptr, nonnilptr, -1},
    	{nonnilptr, nilptr, 1},
    	{nonnilptr, nonnilptr, 0},
    }
    
    func TestLess(t *testing.T) {
    	for _, test := range tests {
    		var b bool
    		switch test.x.(type) {
    		case int:
    			b = cmp.Less(test.x.(int), test.y.(int))
    		case string:
    			b = cmp.Less(test.x.(string), test.y.(string))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 23:39:07 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top