- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for testSlice (0.13 sec)
-
operator/pkg/util/reflect_test.go
} } func TestIsValueFuncs(t *testing.T) { testInt := int(42) testStruct := struct{}{} testSlice := []bool{} testMap := map[bool]bool{} var testNilSlice []bool var testNilMap map[bool]bool allValues := []any{nil, testInt, &testInt, testStruct, &testStruct, testNilSlice, testSlice, &testSlice, testNilMap, testMap, &testMap} tests := []struct { desc string function func(v reflect.Value) bool
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 10.2K bytes - Viewed (0) -
test/range.go
} } func main() { testblankvars() testchan() testarray() testarray1() testarray2() testarrayptr() testarrayptr1() testarrayptr2() testslice() testslice1() testslice2() testslice3() teststring() teststring1() teststring2() testmap() testmap1() testmap2() testcalls()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 05:50:54 UTC 2017 - 8.1K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/compound_test.go
} } func slice_ssa(a, b []byte, x bool) []byte { var s []byte if x { s = a } else { s = b } return s } func testSlice(t *testing.T) { a := []byte{3, 4, 5} b := []byte{7, 8, 9} if want, got := byte(3), slice_ssa(a, b, true)[0]; got != want { t.Errorf("slice_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 2.7K bytes - Viewed (0) -
src/cmd/compile/internal/test/testdata/slice_test.go
// either the slice pointer or the capacity. // See issue #14855. package main import "testing" const N = 1000000 type X struct { s []int } func TestSlice(t *testing.T) { done := make(chan struct{}) a := make([]int, N+10) x := &X{a} go func() { for i := 0; i < N; i++ { x.s = x.s[1:9] } done <- struct{}{} }() go func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:40:04 UTC 2020 - 850 bytes - Viewed (0) -
test/rangegen.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 23:35:19 UTC 2023 - 8.4K bytes - Viewed (0) -
src/encoding/gob/encoder_test.go
var testFloat32 float32 var testString string var testSlice []string var testMap map[string]int var testArray [7]int type SingleTest struct { in any out any err string } var singleTests = []SingleTest{ {17, &testInt, ""}, {float32(17.5), &testFloat32, ""}, {"bike shed", &testString, ""}, {[]string{"bike", "shed", "paint", "color"}, &testSlice, ""},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSourceTest.java
byte[] copy = bytes.clone(); copy[9876] = 1; ByteSource oneByteOff = new TestByteSource(copy); assertFalse(source.contentEquals(oneByteOff)); } public void testSlice() throws IOException { // Test preconditions assertThrows(IllegalArgumentException.class, () -> source.slice(-1, 10)); assertThrows(IllegalArgumentException.class, () -> source.slice(0, -1));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 15.4K bytes - Viewed (0) -
src/sort/sort_test.go
} } func TestStrings(t *testing.T) { data := strings Strings(data[0:]) if !StringsAreSorted(data[0:]) { t.Errorf("sorted %v", strings) t.Errorf(" got %v", data) } } func TestSlice(t *testing.T) { data := strings Slice(data[:], func(i, j int) bool { return data[i] < data[j] }) if !SliceIsSorted(data[:], func(i, j int) bool { return data[i] < data[j] }) { t.Errorf("sorted %v", strings)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 19:41:04 UTC 2024 - 16.9K bytes - Viewed (0) -
src/debug/dwarf/line_test.go
} for i, testLine := range table { if testLine.EndSequence { if err := lr.SeekPC(testLine.Address, &line); err != ErrUnknownPC { t.Fatalf("lr.SeekPC to %#x returned %v instead of ErrUnknownPC", testLine.Address, err) } continue } nextPC := table[i+1].Address for pc := testLine.Address; pc < nextPC; pc++ { if err := lr.SeekPC(pc, &line); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 18 20:34:36 UTC 2023 - 14.5K bytes - Viewed (0) -
src/net/splice_linux_test.go
"os" "strconv" "sync" "syscall" "testing" ) func TestSplice(t *testing.T) { t.Run("tcp-to-tcp", func(t *testing.T) { testSplice(t, "tcp", "tcp") }) if !testableNetwork("unixgram") { t.Skip("skipping unix-to-tcp tests") } t.Run("unix-to-tcp", func(t *testing.T) { testSplice(t, "unix", "tcp") }) t.Run("tcp-to-unix", func(t *testing.T) { testSplice(t, "tcp", "unix") })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 14.5K bytes - Viewed (0)