test: migrate 700_e2e rows to corpus fixtures; retire the carrier
136 rows migrated, 0 already owned, 3 wwstage-failing rows held out.
This commit is contained in:
21
test/wcc/data/r700_strconv_stou64/case.ww
Normal file
21
test/wcc/data/r700_strconv_stou64/case.ww
Normal file
@@ -0,0 +1,21 @@
|
||||
//ww:run-exit 130
|
||||
// Migrated from 700_e2e row 99.
|
||||
package main;
|
||||
import strconv;
|
||||
type r_t = (u64 | strconv.invalid | strconv.overflow);
|
||||
fn main() i32 = {
|
||||
let r1: r_t = strconv.stou64("123", strconv.base.DEC);
|
||||
let r2: r_t = strconv.stou64("-1", strconv.base.DEC);
|
||||
let acc: i32 = 0;
|
||||
match (r1) {
|
||||
case let v: u64 => acc += v: i32;
|
||||
case let e: strconv.invalid => acc += -100;
|
||||
case let e: strconv.overflow => acc += -200;
|
||||
};
|
||||
match (r2) {
|
||||
case let v: u64 => acc += 100;
|
||||
case let e: strconv.invalid => acc += 200;
|
||||
case let e: strconv.overflow => acc += 7;
|
||||
};
|
||||
return acc;
|
||||
};
|
||||
Reference in New Issue
Block a user