Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 64 for Testfunc (0.84 sec)

  1. test/typeparam/issue50485.dir/a.go

    func LessGiven[T ImplicitOrd]() Ord[T] {
    	return LessFunc[T](func(a, b T) bool {
    		return a < b
    	})
    }
    
    type Eq[T any] interface {
    	Eqv(a T, b T) bool
    }
    
    type Ord[T any] interface {
    	Eq[T]
    	Less(a T, b T) bool
    }
    
    type LessFunc[T any] func(a, b T) bool
    
    func (r LessFunc[T]) Eqv(a, b T) bool {
    	return r(a, b) == false && r(b, a) == false
    }
    
    func (r LessFunc[T]) Less(a, b T) bool {
    	return r(a, b)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  2. pkg/scheduler/internal/queue/testing.go

    func NewTestQueue(ctx context.Context, lessFn framework.LessFunc, opts ...Option) *PriorityQueue {
    	return NewTestQueueWithObjects(ctx, lessFn, nil, opts...)
    }
    
    // NewTestQueueWithObjects creates a priority queue with an informer factory
    // populated with the provided objects.
    func NewTestQueueWithObjects(
    	ctx context.Context,
    	lessFn framework.LessFunc,
    	objs []runtime.Object,
    	opts ...Option,
    ) *PriorityQueue {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 10 00:53:58 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  3. pkg/scheduler/internal/heap/heap.go

    	// in "items".
    	queue []string
    
    	// keyFunc is used to make the key used for queued item insertion and retrieval, and
    	// should be deterministic.
    	keyFunc KeyFunc
    	// lessFunc is used to compare two objects in the heap.
    	lessFunc lessFunc
    }
    
    var (
    	_ = heap.Interface(&data{}) // heapData is a standard heap
    )
    
    // Less compares two objects and returns true if the first one should go
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 29 18:37:35 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  4. src/internal/coverage/test/counter_test.go

    				continue
    			}
    			var fp decodecounter.FuncPayload
    			if ok, err := cdr.NextFunc(&fp); err != nil {
    				t.Fatalf("reading func %d: %v", i, err)
    			} else if !ok {
    				t.Fatalf("reading func %d: bad return", i)
    			}
    			got := fmt.Sprintf("%+v", fp)
    			want := fmt.Sprintf("%+v", funcs[i])
    			if got != want {
    				t.Errorf("cdr.NextFunc iter %d\ngot  %+v\nwant %+v", i, got, want)
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 26 12:44:34 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  5. src/archive/tar/reader_test.go

    	)
    
    	vectors := []struct {
    		maker fileMaker
    		tests []testFnc
    	}{{
    		maker: makeReg{"", 0},
    		tests: []testFnc{
    			testRemaining{0, 0},
    			testRead{0, "", io.EOF},
    			testRead{1, "", io.EOF},
    			testWriteTo{nil, 0, nil},
    			testRemaining{0, 0},
    		},
    	}, {
    		maker: makeReg{"", 1},
    		tests: []testFnc{
    			testRemaining{1, 1},
    			testRead{5, "", io.ErrUnexpectedEOF},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 21:14:38 UTC 2022
    - 47.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/mlir_graph_optimization_pass_test.cc

           {MlirOptimizationPassState::Enabled});
    
      GraphDef original_graph_def;
      graph_->ToGraphDef(&original_graph_def);
    
      EXPECT_EQ(
          function_optimization_pass_.Run(
              "test_func", device_set_, config_proto_, function_options_, &graph_,
              flib_.get(), &control_ret_node_names_, &control_rets_updated_),
          Status(absl::StatusCode::kAborted, "aborted"));
      verifyGraph(original_graph_def);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 27 08:25:30 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/api_object_versioner_test.go

    		{Version: " ", Err: true},
    		{Version: "1", ExpectVersion: 1},
    		{Version: "10", ExpectVersion: 10},
    	}
    
    	v := APIObjectVersioner{}
    	testFuncs := []func(string) (uint64, error){
    		v.ParseResourceVersion,
    	}
    
    	for _, testCase := range testCases {
    		for i, f := range testFuncs {
    			version, err := f(testCase.Version)
    			switch {
    			case testCase.Err && err == nil:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 11 16:18:15 UTC 2022
    - 3K bytes
    - Viewed (0)
  8. src/sort/example_multi_test.go

    type Change struct {
    	user     string
    	language string
    	lines    int
    }
    
    type lessFunc func(p1, p2 *Change) bool
    
    // multiSorter implements the Sort interface, sorting the changes within.
    type multiSorter struct {
    	changes []Change
    	less    []lessFunc
    }
    
    // Sort sorts the argument slice according to the less functions passed to OrderedBy.
    func (ms *multiSorter) Sort(changes []Change) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 13 20:16:24 UTC 2022
    - 4K bytes
    - Viewed (0)
  9. pkg/config/schema/kubeclient/common.go

    	return c.Informers().InformerFor(g, opts, func() cache.SharedIndexInformer {
    		inf := cache.NewSharedIndexInformerWithOptions(
    			&cache.ListWatch{
    				ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
    					options.FieldSelector = opts.FieldSelector
    					options.LabelSelector = opts.LabelSelector
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. platforms/native/testing-native/src/integTest/groovy/org/gradle/nativeplatform/test/cpp/plugins/CppUnitTestWithLibraryIntegrationTest.groovy

                    return lib();
                }
            """
        }
    
        @Override
        protected void changeTestImplementation() {
            file("src/test/cpp/test_lib.cpp") << """
                void test_func() { }
            """
        }
    
        @Override
        protected void assertTestCasesRan() {
            // ok
        }
    
        @Override
        protected String[] getTasksToCompileComponentUnderTest(String architecture) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 20:20:03 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top