Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhnguyen-aws committed Nov 15, 2024
1 parent 0937022 commit bb789a7
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 221 deletions.
471 changes: 264 additions & 207 deletions kani-compiler/src/codegen_aeneas_llbc/mir_to_ullbc/mod.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/expected/llbc/basic0/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ fn is_zero(i: i32) -> bool {
#[kani::proof]
fn main() {
let _ = is_zero(0);
}
}
8 changes: 2 additions & 6 deletions tests/expected/llbc/enum_test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,18 @@

//! This test checks that Kani's LLBC backend handles simple enum


enum MyEnum {
A(i32),
B,
}


fn enum_match(e: MyEnum) -> i32 {
match e {
MyEnum::A(i) => i ,
MyEnum::B => 0 ,
MyEnum::A(i) => i,
MyEnum::B => 0,
}
}



#[kani::proof]
fn main() {
let e = MyEnum::A(1);
Expand Down
7 changes: 2 additions & 5 deletions tests/expected/llbc/projection_test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,16 @@ enum MyEnum {
B,
}


fn enum_match(e: MyEnum) -> i32 {
match e {
MyEnum::A(s, i) => s.a + i,
MyEnum::B => 0 ,
MyEnum::B => 0,
}
}



#[kani::proof]
fn main() {
let s = MyStruct { a: 1, b: 2 };
let e = MyEnum::A(s,1);
let e = MyEnum::A(s, 1);
let i = enum_match(e);
}
2 changes: 1 addition & 1 deletion tests/expected/llbc/struct_test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! This test checks that Kani's LLBC backend handles simple struct

struct MyStruct{
struct MyStruct {
a: i32,
b: bool,
}
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/llbc/tuple_test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! This test checks that Kani's LLBC backend handles simple tuple

fn tuple_add (t: (i32, i32)) -> i32 {
fn tuple_add(t: (i32, i32)) -> i32 {
t.0 + t.1
}

Expand Down

0 comments on commit bb789a7

Please sign in to comment.