Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewDecimal (0.17 sec)

  1. src/strconv/decimal_test.go

    }
    
    func TestDecimalRound(t *testing.T) {
    	for i := 0; i < len(roundtests); i++ {
    		test := &roundtests[i]
    		d := NewDecimal(test.i)
    		d.RoundDown(test.nd)
    		s := d.String()
    		if s != test.down {
    			t.Errorf("Decimal %v RoundDown %d = %v, want %v",
    				test.i, test.nd, s, test.down)
    		}
    		d = NewDecimal(test.i)
    		d.Round(test.nd)
    		s = d.String()
    		if s != test.round {
    			t.Errorf("Decimal %v Round %d = %v, want %v",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 3K bytes
    - Viewed (0)
  2. src/strconv/internal_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // export access to strconv internals for tests
    
    package strconv
    
    func NewDecimal(i uint64) *decimal {
    	d := new(decimal)
    	d.Assign(i)
    	return d
    }
    
    func SetOptimize(b bool) bool {
    	old := optimize
    	optimize = b
    	return old
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 15 08:44:21 UTC 2021
    - 618 bytes
    - Viewed (0)
Back to top