Skip to content

Commit e1fbcec

Browse files
paaassscccaaalllJonasAlaif
authored andcommitted
added tests
1 parent 3e5bb8f commit e1fbcec

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
fn test() {
2+
let mut idx: usize = 0;
3+
let length: usize = 10;;
4+
while idx < length {
5+
loop_invariant!(idx <= length);
6+
loop_invariant!(0 <= length);
7+
idx += 1;
8+
let mut jdx: usize = 0;
9+
let inner_length: usize = 5;
10+
while jdx < inner_length {
11+
loop_invariant!(jdx <= inner_length);
12+
jdx += 1;
13+
}
14+
}
15+
}
16+
17+
fn main() {
18+
test();
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
fn test() {
2+
let mut idx: usize = 0;
3+
let length: usize = 10;;
4+
while idx < length {
5+
loop_invariant!(idx <= length);
6+
idx += 1;
7+
}
8+
}
9+
10+
fn main() {
11+
test();
12+
}

0 commit comments

Comments
 (0)