Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for check_cbytes (0.18 sec)

  1. src/cmd/cgo/internal/test/test.go

    };
    
    struct b11925 {
    	int i;
    	char a[0];
    	char b[];
    };
    
    // issue 12030
    void issue12030conv(char *buf, double x) {
    	sprintf(buf, "d=%g", x);
    }
    
    // issue 14838
    
    int check_cbytes(char *b, size_t l) {
    	int i;
    	for (i = 0; i < l; i++) {
    		if (b[i] != i) {
    			return 0;
    		}
    	}
    	return 1;
    }
    
    // issue 17065
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  2. src/math/big/int_test.go

    		t.Error(err)
    	}
    }
    
    func checkBytes(b []byte) bool {
    	// trim leading zero bytes since Bytes() won't return them
    	// (was issue 12231)
    	for len(b) > 0 && b[0] == 0 {
    		b = b[1:]
    	}
    	b2 := new(Int).SetBytes(b).Bytes()
    	return bytes.Equal(b, b2)
    }
    
    func TestBytes(t *testing.T) {
    	if err := quick.Check(checkBytes, nil); err != nil {
    		t.Error(err)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
Back to top