- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 57 for newResource (0.18 sec)
-
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
} @Test fun multipleSources() { val upstream = Buffer() upstream.writeUtf8("abcdefghijklm") val relay = edit(file, upstream, metadata, 1024) val source1 = relay.newSource()!!.buffer() val source2 = relay.newSource()!!.buffer() assertThat(source1.readUtf8()).isEqualTo("abcdefghijklm") assertThat(source2.readUtf8()).isEqualTo("abcdefghijklm") source1.close() source2.close()
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 8.1K bytes - Viewed (0) -
platforms/native/language-native/src/test/groovy/org/gradle/language/nativeplatform/internal/incremental/IncrementalNativeCompilerTest.groovy
def "updates spec for incremental compilation"() { def spec = Mock(NativeCompileSpec) def newSource = temporaryFolder.file("new") def removedSource = temporaryFolder.file("removed") def compilation = Mock(IncrementalCompilation) when: compilation.getRecompile() >> [newSource] compilation.getRemoved() >> [removedSource] and:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Nov 16 20:20:03 UTC 2023 - 3.3K bytes - Viewed (0) -
platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/UnionFileCollection.java
ImmutableSet.Builder<FileCollectionInternal> newSource = ImmutableSet.builderWithExpectedSize(source.size()); boolean hasChanges = false; for (FileCollectionInternal candidate : source) { FileCollectionInternal newCollection = candidate.replace(original, supplier); hasChanges |= newCollection != candidate; newSource.add(newCollection); } if (hasChanges) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Sep 28 09:51:04 UTC 2023 - 2.9K bytes - Viewed (0) -
src/internal/trace/mud_test.go
package trace import ( "math" "math/rand" "testing" ) func TestMUD(t *testing.T) { // Insert random uniforms and check histogram mass and // cumulative sum approximations. rnd := rand.New(rand.NewSource(42)) mass := 0.0 var mud mud for i := 0; i < 100; i++ { area, l, r := rnd.Float64(), rnd.Float64(), rnd.Float64() if rnd.Intn(10) == 0 { r = l } t.Log(l, r, area) mud.add(l, r, area)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/api/testing/copy_test.go
for i := 0; i < *roundtrip.FuzzIters; i++ { for _, version := range []schema.GroupVersion{{Group: "", Version: runtime.APIVersionInternal}, {Group: "", Version: "v1"}} { f := fuzzer.FuzzerFor(FuzzerFuncs, rand.NewSource(rand.Int63()), legacyscheme.Codecs) for kind := range legacyscheme.Scheme.KnownTypes(version) { doDeepCopyTest(t, version.WithKind(kind), f) } } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:45:31 UTC 2023 - 2.7K bytes - Viewed (0) -
cmd/erasure-common.go
"time" "github.com/minio/pkg/v3/sync/errgroup" ) func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) { disks := er.getDisks() var wg sync.WaitGroup var mu sync.Mutex r := rand.New(rand.NewSource(time.Now().UnixNano())) for _, i := range r.Perm(len(disks)) { i := i wg.Add(1) go func() { defer wg.Done() if disks[i] == nil { return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.6K bytes - Viewed (0) -
src/image/jpeg/writer_test.go
bo := image.Rect(0, 0, 640, 480) imgRGBA := image.NewRGBA(bo) // Must use 444 subsampling to avoid lossy RGBA to YCbCr conversion. imgYCbCr := image.NewYCbCr(bo, image.YCbCrSubsampleRatio444) rnd := rand.New(rand.NewSource(123)) // Create identical rgba and ycbcr images. for y := bo.Min.Y; y < bo.Max.Y; y++ { for x := bo.Min.X; x < bo.Max.X; x++ { col := color.RGBA{ uint8(rnd.Intn(256)), uint8(rnd.Intn(256)),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:49:30 UTC 2022 - 7.2K bytes - Viewed (0) -
src/go/doc/testdata/examples/issue43658.golden
// Since this is a randomized algorithm we use a defined random source to ensure // consistency between test runs. In practice, results will not differ greatly // between runs with different PRNG seeds. src := rand.NewSource(1) // Create dumbell graph: // // 0 4 // |\ /| // | 2 - 3 | // |/ \| // 1 5 // g := simple.NewUndirectedGraph() for u, e := range smallDumbell {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 23:13:45 UTC 2022 - 4.5K bytes - Viewed (0) -
src/crypto/rand/util_test.go
if p, err := rand.Prime(rand.Reader, 1); p != nil || err == nil { t.Errorf("Prime should return nil, error when called with bits < 2") } } func TestPrimeNondeterministic(t *testing.T) { r := mathrand.New(mathrand.NewSource(42)) p0, err := rand.Prime(r, 32) if err != nil { t.Fatal(err) } for i := 0; i < 128; i++ { r.Seed(42) p, err := rand.Prime(r, 32) if err != nil { t.Fatal(err) } if p.Cmp(p0) != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 01:35:39 UTC 2022 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/meta_test.go
"github.com/google/go-cmp/cmp" fuzz "github.com/google/gofuzz" ) func TestAsPartialObjectMetadata(t *testing.T) { f := fuzz.New().NilChance(.5).NumElements(0, 1).RandSource(rand.NewSource(1)) for i := 0; i < 100; i++ { m := &metav1.ObjectMeta{} f.Fuzz(m) partial := AsPartialObjectMetadata(m) if !reflect.DeepEqual(&partial.ObjectMeta, m) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 1.5K bytes - Viewed (0)