| # 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: |
| int 300 overflows byte in argument 1 in call to strconv.FormatFloat: |
| ./in.cue:4:5 |
| cannot use -1 (type int) as byte in argument 1 to strconv.FormatFloat: |
| ./in.cue:5:5 |
| t4: cannot use 1.0 (type float) as int in argument 2 to strconv.FormatFloat: |
| ./in.cue:6:31 |
| |
| Result: |
| (_|_){ |
| // [eval] |
| t1: (string){ "40" } |
| t2: (_|_){ |
| // [eval] int 300 overflows byte in argument 1 in call to strconv.FormatFloat: |
| // ./in.cue:4:5 |
| } |
| t3: (_|_){ |
| // [eval] cannot use -1 (type int) as byte in argument 1 to strconv.FormatFloat: |
| // ./in.cue:5:5 |
| } |
| t4: (_|_){ |
| // [eval] t4: cannot use 1.0 (type float) as int in argument 2 to strconv.FormatFloat: |
| // ./in.cue:6:31 |
| } |
| t5: (string){ "true" } |
| } |