| # generated from the original tests. |
| # Henceforth it may be nicer to group tests into separate files. |
| -- in.cue -- |
| import "strconv" |
| |
| t1: strconv.FormatUint(64, 16) |
| t2: strconv.FormatFloat(3.02, 300, 4, 64) |
| t3: strconv.FormatFloat(3.02, -1, 4, 64) |
| t4: strconv.FormatFloat(3.02, 1.0, 4, 64) |
| t5: strconv.FormatBool(true) |
| -- out/strconv -- |
| Errors: |
| t2: int 300 overflows byte in argument 1 in call to strconv.FormatFloat: |
| ./in.cue:4:5 |
| t3: cannot use -1 (type int) as byte in argument 1 to strconv.FormatFloat: |
| ./in.cue:5:5 |
| ./in.cue:5:31 |
| t4: cannot use 1.0 (type float) as int in argument 2 to strconv.FormatFloat: |
| ./in.cue:6:31 |
| |
| Result: |
| t1: "40" |
| t2: _|_ // t2: int 300 overflows byte in argument 1 in call to strconv.FormatFloat |
| t3: _|_ // t3: cannot use -1 (type int) as byte in argument 1 to strconv.FormatFloat |
| t4: _|_ // t4: cannot use 1.0 (type float) as int in argument 2 to strconv.FormatFloat |
| t5: "true" |
| |