diff options
Diffstat (limited to 'src/math/big/example_test.go')
-rw-r--r-- | src/math/big/example_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/math/big/example_test.go b/src/math/big/example_test.go index cfc77351d4..31ca784154 100644 --- a/src/math/big/example_test.go +++ b/src/math/big/example_test.go @@ -25,6 +25,13 @@ func ExampleInt_SetString() { // Output: 420 } +func ExampleFloat_SetString() { + f := new(big.Float) + f.SetString("3.14159") + fmt.Println(f) + // Output: 3.14159 +} + func ExampleRat_Scan() { // The Scan function is rarely used directly; // the fmt package recognizes it as an implementation of fmt.Scanner. |