Skip to content

Commit

Permalink
Updated linearityCheck testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
kenarab committed May 10, 2024
1 parent 211fd05 commit a144cf3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions crates/concrete_driver/tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ mod common;
#[test_case(include_str!("../../../examples/for.con"), "for", false, 10 ; "for.con")]
#[test_case(include_str!("../../../examples/for_while.con"), "for_while", false, 10 ; "for_while.con")]
#[test_case(include_str!("../../../examples/arrays.con"), "arrays", false, 5 ; "arrays.con")]
#[test_case(include_str!("../../../examples/linearExample01.con"), "linearity", false, 1 ; "linearExample01.con")]
#[test_case(include_str!("../../../examples/linearExample02.con"), "linearity", false, 1 ; "linearExample02.con")]
#[test_case(include_str!("../../../examples/linearExample03if.con"), "linearity", false, 255 ; "linearExample03if.con")]
#[test_case(include_str!("../../../examples/linearExample01.con"), "linearity", false, 2 ; "linearExample01.con")]
#[test_case(include_str!("../../../examples/linearExample02.con"), "linearity", false, 2 ; "linearExample02.con")]
#[test_case(include_str!("../../../examples/linearExample03if.con"), "linearity", false, 0 ; "linearExample03if.con")]
fn example_tests(source: &str, name: &str, is_library: bool, status_code: i32) {
assert_eq!(
status_code,
Expand Down
4 changes: 2 additions & 2 deletions examples/linearExample01.con
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mod LinearExampleStub {
fn main() -> i32 {
let mut xy: Linear =
Linear {
x: 0,
y: 1,
x: 1,
y: 0,
};
// FIXME Prefered initialization but not yet implemented
// [1, 0];
Expand Down
4 changes: 2 additions & 2 deletions examples/linearExample02.con
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ mod LinearExampleStub {
fn main() -> i32 {
let mut xy: Linear =
Linear {
x: 0,
y: 1,
x: 1,
y: 0,
};
// FIXME Prefered initialization but not yet implemented
// [1, 0];
Expand Down
6 changes: 3 additions & 3 deletions examples/linearExample03if.con
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ mod LinearExampleIfStub {
fn main() -> i32 {
let mut xy: Linear =
Linear {
x: 0,
y: 1,
x: 1,
y: 0,
};
// FIXME Prefered initialization but not yet implemented
// [1, 0];
if xy.x > xy.y{
if xy.x < xy.y{
consume_x(&mut xy, 1);
}
else {
Expand Down

0 comments on commit a144cf3

Please sign in to comment.