Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 227 for fuzz (0.21 sec)

  1. src/syscall/wtf8_windows_test.go

    			if !slices.Equal(got, tt.wstr) {
    				t.Errorf("got:\n%v\nwant:\n%v", got, tt.wstr)
    			}
    		})
    	}
    }
    
    func FuzzEncodeWTF16(f *testing.F) {
    	for _, tt := range wtf8tests {
    		f.Add(tt.str)
    	}
    	f.Fuzz(func(t *testing.T, b string) {
    		// test that there are no panics
    		got := syscall.EncodeWTF16(b, nil)
    		syscall.DecodeWTF16(got, nil)
    		if utf8.ValidString(b) {
    			// if the input is a valid UTF-8 string, then
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 09:26:16 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/test/api_meta_help_test.go

    func TestSetExtractListRoundTrip(t *testing.T) {
    	scheme := runtime.NewScheme()
    	codecs := serializer.NewCodecFactory(scheme)
    	fuzzer := fuzz.New().NilChance(0).NumElements(1, 5).Funcs(metafuzzer.Funcs(codecs)...).MaxDepth(10)
    	for i := 0; i < 5; i++ {
    		start := &testapigroup.CarpList{}
    		fuzzer.Fuzz(&start.Items)
    
    		list, err := meta.ExtractList(start)
    		if err != nil {
    			t.Errorf("Unexpected error %v", err)
    			continue
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  3. src/cmd/go/internal/test/flagdefs.go

    	"blockprofilerate":     true,
    	"count":                true,
    	"coverprofile":         true,
    	"cpu":                  true,
    	"cpuprofile":           true,
    	"failfast":             true,
    	"fullpath":             true,
    	"fuzz":                 true,
    	"fuzzminimizetime":     true,
    	"fuzztime":             true,
    	"list":                 true,
    	"memprofile":           true,
    	"memprofilerate":       true,
    	"mutexprofile":         true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 01:02:40 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/work/exec_test.go

    		if got := objabi.DecodeArg(encodeArg(arg)); got != arg {
    			t.Errorf("objabi.DecodeArg(encodeArg(%q)) = %q", arg, got)
    		}
    	}
    }
    
    func TestEncodeDecodeFuzz(t *testing.T) {
    	if testing.Short() {
    		t.Skip("fuzz test is slow")
    	}
    	t.Parallel()
    
    	nRunes := sys.ExecArgLengthLimit + 100
    	rBuffer := make([]rune, nRunes)
    	buf := bytes.NewBuffer([]byte(string(rBuffer)))
    
    	seed := time.Now().UnixNano()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 02 13:15:42 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  5. src/image/gif/fuzz_test.go

    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("../testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    		f.Add(b)
    	}
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    		cfg, _, err := image.DecodeConfig(bytes.NewReader(b))
    		if err != nil {
    			return
    		}
    		if cfg.Width*cfg.Height > 1e6 {
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 15:57:34 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  6. src/crypto/cipher/cbc.go

    // mode, using the given Block. The length of iv must be the same as the
    // Block's block size. This always returns the generic non-asm encrypter for use
    // in fuzz testing.
    func newCBCGenericEncrypter(b Block, iv []byte) BlockMode {
    	if len(iv) != b.BlockSize() {
    		panic("cipher.NewCBCEncrypter: IV length must equal block size")
    	}
    	return (*cbcEncrypter)(newCBC(b, iv))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 03:55:33 UTC 2022
    - 5.4K bytes
    - Viewed (0)
  7. src/image/jpeg/fuzz_test.go

    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("../testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    		f.Add(b)
    	}
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    		cfg, _, err := image.DecodeConfig(bytes.NewReader(b))
    		if err != nil {
    			return
    		}
    		if cfg.Width*cfg.Height > 1e6 {
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 15:56:27 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  8. src/image/png/fuzz_test.go

    			continue
    		}
    		b, err := os.ReadFile(filepath.Join("../testdata", de.Name()))
    		if err != nil {
    			f.Fatalf("failed to read testdata: %s", err)
    		}
    		f.Add(b)
    	}
    
    	f.Fuzz(func(t *testing.T, b []byte) {
    		cfg, _, err := image.DecodeConfig(bytes.NewReader(b))
    		if err != nil {
    			return
    		}
    		if cfg.Width*cfg.Height > 1e6 {
    			return
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 15:56:27 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. src/internal/fuzz/queue.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package fuzz
    
    // queue holds a growable sequence of inputs for fuzzing and minimization.
    //
    // For now, this is a simple ring buffer
    // (https://en.wikipedia.org/wiki/Circular_buffer).
    //
    // TODO(golang.org/issue/46224): use a prioritization algorithm based on input
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 05 21:02:45 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go

    				t.Errorf("Failed equality test for '%v': expected %+v, got %+v", c.x, c.result, result)
    			}
    		})
    	}
    }
    
    func TestTimeRoundtripCBOR(t *testing.T) {
    	fuzzer := fuzz.New()
    	for i := 0; i < 500; i++ {
    		var initial, final Time
    		fuzzer.Fuzz(&initial)
    		b, err := cbor.Marshal(initial)
    		if err != nil {
    			t.Errorf("error encoding %v: %v", initial, err)
    			continue
    		}
    		err = cbor.Unmarshal(b, &final)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top