Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 631 for setString (0.47 sec)

  1. src/crypto/elliptic/p256_test.go

    	}
    }
    
    func TestP256Mult(t *testing.T) {
    	p256 := P256()
    	for i, e := range p256MultTests {
    		x, _ := new(big.Int).SetString(e.xIn, 16)
    		y, _ := new(big.Int).SetString(e.yIn, 16)
    		k, _ := new(big.Int).SetString(e.k, 16)
    		expectedX, _ := new(big.Int).SetString(e.xOut, 16)
    		expectedY, _ := new(big.Int).SetString(e.yOut, 16)
    
    		xx, yy := p256.ScalarMult(x, y, k.Bytes())
    		if xx.Cmp(expectedX) != 0 || yy.Cmp(expectedY) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 16:58:48 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  2. testing/internal-performance-testing/src/main/groovy/org/gradle/performance/results/AbstractWritableResultsStore.groovy

                            String testClass = experimentTimes.getString(++resultIdx)
                            String testName = experimentTimes.getString(++resultIdx)
                            String testProject = experimentTimes.getString(++resultIdx)
                            OperatingSystem os = OperatingSystem.valueOf(experimentTimes.getString(++resultIdx))
                            long avgDuration = experimentTimes.getLong(++resultIdx)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. src/math/big/ratmarsh_test.go

    	var medium bytes.Buffer
    	enc := gob.NewEncoder(&medium)
    	dec := gob.NewDecoder(&medium)
    	for _, test := range encodingTests {
    		medium.Reset() // empty buffer for each test case (in case of failures)
    		var tx Rat
    		tx.SetString(test + ".14159265")
    		if err := enc.Encode(&tx); err != nil {
    			t.Errorf("encoding of %s failed: %s", &tx, err)
    			continue
    		}
    		var rx Rat
    		if err := dec.Decode(&rx); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 11 20:20:16 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  4. src/math/big/intmarsh_test.go

    	for _, test := range encodingTests {
    		for _, sign := range []string{"", "+", "-"} {
    			x := sign + test
    			medium.Reset() // empty buffer for each test case (in case of failures)
    			var tx Int
    			tx.SetString(x, 10)
    			if err := enc.Encode(&tx); err != nil {
    				t.Errorf("encoding of %s failed: %s", &tx, err)
    				continue
    			}
    			var rx Int
    			if err := dec.Decode(&rx); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 07 23:27:14 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  5. pkg/registry/core/service/allocator/utils_test.go

    */
    
    package allocator
    
    import (
    	"math/big"
    	"testing"
    )
    
    func TestCountBits(t *testing.T) {
    	// bigN is an integer that occupies more than one big.Word.
    	bigN, ok := big.NewInt(0).SetString("10000000000000000000000000000000000000000000000000000000000000000", 16)
    	if !ok {
    		t.Fatal("Failed to set bigN")
    	}
    	tests := []struct {
    		n        *big.Int
    		expected int
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 01 15:08:36 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  6. src/crypto/x509/oid.go

    	}
    	secondNum, oid, nextComponentExists = strings.Cut(oid, ".")
    
    	var (
    		first  = big.NewInt(0)
    		second = big.NewInt(0)
    	)
    
    	if _, ok := first.SetString(firstNum, 10); !ok {
    		return errInvalidOID
    	}
    	if _, ok := second.SetString(secondNum, 10); !ok {
    		return errInvalidOID
    	}
    
    	if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. src/math/big/doc.go

    numeric values, and vice versa: *[Int], *[Rat], and *[Float] values implement
    the Stringer interface for a (default) string representation of the value,
    but also provide SetString methods to initialize a value from a string in
    a variety of supported formats (see the respective SetString documentation).
    
    Finally, *[Int], *[Rat], and *[Float] satisfy [fmt.Scanner] for scanning
    and (except for *[Rat]) the Formatter interface for formatted printing.
    */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/text/unicode/norm/input.go

    	return input{bytes: str}
    }
    
    func inputString(str string) input {
    	return input{str: str}
    }
    
    func (in *input) setBytes(str []byte) {
    	in.str = ""
    	in.bytes = str
    }
    
    func (in *input) setString(str string) {
    	in.str = str
    	in.bytes = nil
    }
    
    func (in *input) _byte(p int) byte {
    	if in.bytes == nil {
    		return in.str[p]
    	}
    	return in.bytes[p]
    }
    
    func (in *input) skipASCII(p, max int) int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go

    			// TODO: set some new value
    		}
    	case reflect.Func: // ignore, we don't have function types in our API
    	default:
    		if !obj.CanSet() {
    			return
    		}
    		switch obj.Kind() {
    		case reflect.String:
    			obj.SetString(obj.String() + "x")
    		case reflect.Bool:
    			obj.SetBool(!obj.Bool())
    		case reflect.Float32, reflect.Float64:
    			obj.SetFloat(obj.Float()*2.0 + 1.0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  10. src/math/big/ratmarsh.go

    	return x.marshal(), nil
    }
    
    // UnmarshalText implements the [encoding.TextUnmarshaler] interface.
    func (z *Rat) UnmarshalText(text []byte) error {
    	// TODO(gri): get rid of the []byte/string conversion
    	if _, ok := z.SetString(string(text)); !ok {
    		return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Rat", text)
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top