Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for arbitraryValues (0.19 sec)

  1. src/testing/quick/quick.go

    		}
    	}
    
    	return nil
    }
    
    // arbitraryValues writes Values to args such that args contains Values
    // suitable for calling f.
    func arbitraryValues(args []reflect.Value, f reflect.Type, config *Config, rand *rand.Rand) (err error) {
    	if config.Values != nil {
    		config.Values(args, rand)
    		return
    	}
    
    	for j := 0; j < len(args); j++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:47 UTC 2023
    - 10.1K bytes
    - Viewed (0)
  2. src/testing/quick/quick_test.go

    	reportError("fUintptr", CheckEqual(fUintptr, fUintptr, nil), t)
    	reportError("fUintptrAlias", CheckEqual(fUintptrAlias, fUintptrAlias, nil), t)
    }
    
    // This tests that ArbitraryValue is working by checking that all the arbitrary
    // values of type MyStruct have x = 42.
    type myStruct struct {
    	x int
    }
    
    func (m myStruct) Generate(r *rand.Rand, _ int) reflect.Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 12:54:00 UTC 2019
    - 9K bytes
    - Viewed (0)
Back to top