Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for byteSliceArithmeticUint8 (0.44 sec)

  1. src/internal/fuzz/mutators_byteslice_test.go

    		},
    		{
    			name:     "byteSliceSwapByte",
    			mutator:  byteSliceSwapByte,
    			input:    []byte{1, 2, 3, 4},
    			expected: []byte{2, 1, 3, 4},
    		},
    		{
    			name:     "byteSliceArithmeticUint8",
    			mutator:  byteSliceArithmeticUint8,
    			input:    []byte{1, 2, 3, 4},
    			expected: []byte{255, 2, 3, 4},
    		},
    		{
    			name:     "byteSliceArithmeticUint16",
    			mutator:  byteSliceArithmeticUint16,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 19 18:23:43 UTC 2021
    - 4.3K bytes
    - Viewed (0)
  2. src/internal/fuzz/mutators_byteslice.go

    	}
    	src := m.rand(len(b))
    	dst := m.rand(len(b))
    	for dst == src {
    		dst = m.rand(len(b))
    	}
    	b[src], b[dst] = b[dst], b[src]
    	return b
    }
    
    // byteSliceArithmeticUint8 adds/subtracts from a random byte in b.
    func byteSliceArithmeticUint8(m *mutator, b []byte) []byte {
    	if len(b) == 0 {
    		return nil
    	}
    	pos := m.rand(len(b))
    	v := byte(m.rand(35) + 1)
    	if m.r.bool() {
    		b[pos] += v
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 19 18:23:43 UTC 2021
    - 7.7K bytes
    - Viewed (0)
  3. src/internal/fuzz/mutator.go

    	byteSliceRemoveBytes,
    	byteSliceInsertRandomBytes,
    	byteSliceDuplicateBytes,
    	byteSliceOverwriteBytes,
    	byteSliceBitFlip,
    	byteSliceXORByte,
    	byteSliceSwapByte,
    	byteSliceArithmeticUint8,
    	byteSliceArithmeticUint16,
    	byteSliceArithmeticUint32,
    	byteSliceArithmeticUint64,
    	byteSliceOverwriteInterestingUint8,
    	byteSliceOverwriteInterestingUint16,
    	byteSliceOverwriteInterestingUint32,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 20:01:34 UTC 2023
    - 6.6K bytes
    - Viewed (0)
Back to top