Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 4,183 for equalfn (1.57 sec)

  1. test/typeparam/sliceimp.dir/main.go

    	s1 := []int{1, 2, 3}
    	s2 := []int{2, 3, 4}
    	if a.EqualFn(s1, s1, offByOne[int]) {
    		panic(fmt.Sprintf("a.EqualFn(%v, %v, offByOne) = true, want false", s1, s1))
    	}
    	if !a.EqualFn(s1, s2, offByOne[int]) {
    		panic(fmt.Sprintf("a.EqualFn(%v, %v, offByOne) = false, want true", s1, s2))
    	}
    
    	if !a.EqualFn(s1[:0], nil, offByOne[int]) {
    		panic(fmt.Sprintf("a.EqualFn(%v, nil, offByOne) = false, want true", s1[:0]))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 4.6K bytes
    - Viewed (0)
  2. test/typeparam/sliceimp.dir/a.go

    // Min returns the minimum of two values of some ordered type.
    func Min[T Ordered](a, b T) T {
    	if a < b {
    		return a
    	}
    	return b
    }
    
    // Equal reports whether two slices are equal: the same length and all
    // elements equal. All floating point NaNs are considered equal.
    func Equal[Elem comparable](s1, s2 []Elem) bool {
    	if len(s1) != len(s2) {
    		return false
    	}
    	for i, v1 := range s1 {
    		v2 := s2[i]
    		if v1 != v2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 30 01:55:58 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  3. src/go/internal/gccgoimporter/testdata/v1reflect.gox

    .reflect.kind <type -5>; .reflect.align <type -1>; .reflect.fieldAlign <type -5>; .reflect._ <type -5>; .reflect.size <type -13>; .reflect.hash <type -7>; .reflect.hashfn <type 6 (? <type 7 "unsafe.Pointer" <type 8 *any>>, ? <type -13>)>; .reflect.equalfn <type 9 (? <type 7>, ? <type 7>, ? <type -13>)>; .reflect.string <type 10 *<type -16>>; ? <type 11 *<type 12 ".reflect.uncommonType" <type 13 struct { .reflect.name <type 14 *<type -16>>; .reflect.pkgPath <type 15 *<type -16>>; .reflect.methods <type...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 30 21:33:51 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  4. src/maps/maps_test.go

    }
    
    func TestEqualFunc(t *testing.T) {
    	if !EqualFunc(m1, m1, equal[int]) {
    		t.Errorf("EqualFunc(%v, %v, equal) = false, want true", m1, m1)
    	}
    	if EqualFunc(m1, (map[int]int)(nil), equal[int]) {
    		t.Errorf("EqualFunc(%v, nil, equal) = true, want false", m1)
    	}
    	if EqualFunc((map[int]int)(nil), m1, equal[int]) {
    		t.Errorf("EqualFunc(nil, %v, equal) = true, want false", m1)
    	}
    	if !EqualFunc[map[int]int, map[int]int](nil, nil, equal[int]) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 17:05:56 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. test/typeparam/equal.go

    Matthew Dempsky <******@****.***> 1646087539 -0800
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  6. src/slices/slices_test.go

    			t.Errorf("EqualFunc(%v, %v, equal[int]) = %t, want %t", test.s1, test.s2, got, test.want)
    		}
    	}
    	for _, test := range equalFloatTests {
    		if got := EqualFunc(test.s1, test.s2, equal[float64]); got != test.wantEqual {
    			t.Errorf("Equal(%v, %v, equal[float64]) = %t, want %t", test.s1, test.s2, got, test.wantEqual)
    		}
    		if got := EqualFunc(test.s1, test.s2, equalNaN[float64]); got != test.wantEqualNaN {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  7. platforms/core-configuration/configuration-cache/src/test/kotlin/org/gradle/internal/cc/impl/serialization/codecs/JavaObjectSerializationCodecTest.kt

                assertThat(
                    it.childBean?.value,
                    equalTo(42)
                )
                assertThat(it.someInt, equalTo(13))
            }
        }
    
        @Test
        fun `can handle multiple writeObject implementations in the hierarchy`() {
            verifyRoundtripOf({ MultiWriteObjectBean() }) { bean ->
                assertThat(
                    bean.stringValue,
                    equalTo("42")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  8. platforms/jvm/scala/src/test/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSetTest.groovy

            assertThat(sourceSet.scala, instanceOf(DefaultSourceDirectorySet))
            assertThat(sourceSet.scala, isEmpty())
            assertThat(sourceSet.scala.displayName, equalTo('<set-display-name> Scala source'))
            assertThat(sourceSet.scala.filter.includes, equalTo(['**/*.scala', '**/*.java'] as Set))
            assertThat(sourceSet.scala.filter.excludes, isEmpty())
    
            assertThat(sourceSet.allScala, instanceOf(DefaultSourceDirectorySet))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 15:43:33 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/provider/ClassLoaderHierarchyTest.kt

                assertThat(hierarchy.classLoaders.size, equalTo(3))
                assertThat(hierarchy.scopes.size, equalTo(1))
                assertThat(hierarchy.classLoaders[0].parents, hasItem(hierarchy.classLoaders[1].id))
                assertThat(hierarchy.scopes[0].label, equalTo("the path"))
                assertThat(hierarchy.scopes[0].localClassLoader, equalTo(hierarchy.classLoaders[0].id))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  10. subprojects/core/src/testFixtures/groovy/org/gradle/api/file/FileVisitorUtil.groovy

            ] as FileVisitor
    
            tree.visit(visitor)
    
            assertThat(files, equalTo(expectedFiles as Set))
            assertThat(dirs, equalTo(expectedDirs as Set))
    
            files = [] as Set
            tree.visit {FileVisitDetails details ->
                assertTrue(files.add(details.relativePath.pathString))
            }
    
            assertThat(files, equalTo(expectedFiles + expectedDirs as Set))
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 22 14:26:33 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top