Skip to content

Commit b175780

Browse files
committed
shrink test_match
1 parent 10d2ed2 commit b175780

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

crates/lean_compiler/tests/test_compiler.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -385,23 +385,7 @@ fn test_inlined() {
385385
fn test_match() {
386386
let program = r#"
387387
fn main() {
388-
for x in 0..3 {
389-
func_match(x);
390-
}
391-
for x in 0..2 {
392-
match x {
393-
0 => {
394-
y = 10 * (x + 8);
395-
z = 10 * y;
396-
print(z);
397-
}
398-
1 => {
399-
y = 10 * x;
400-
z = func_2(y);
401-
print(z);
402-
}
403-
}
404-
}
388+
func_match(1);
405389
return;
406390
}
407391
@@ -415,8 +399,6 @@ fn test_match() {
415399
print(y + 1);
416400
}
417401
2 => {
418-
y = 10 * x;
419-
print(y);
420402
}
421403
}
422404
return;
@@ -425,10 +407,6 @@ fn test_match() {
425407
fn func_1(x) -> 1 {
426408
return x * x * x * x;
427409
}
428-
429-
fn func_2(x) -> 1 {
430-
return x * x * x * x * x * x;
431-
}
432410
"#;
433411
compile_and_run(program.to_string(), (&[], &[]), DEFAULT_NO_VEC_RUNTIME_MEMORY, false);
434412
}

0 commit comments

Comments
 (0)