Skip to content

Commit 3a2e20b

Browse files
committed
fix: test for #[thrust::predicate]
1 parent 125b56e commit 3a2e20b

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

tests/ui/pass/annot_preds.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33

44
#[thrust::predicate]
55
fn is_double(x: i64, doubled_x: i64) -> bool {
6-
x * 2 == doubled_x
7-
// "(=(
8-
// (* (x 2))
9-
// doubled_x
10-
// ))"
6+
"(=
7+
(* x 2)
8+
doubled_x
9+
)"; true
1110
}
1211

1312
#[thrust::requires(true)]
14-
#[thrust::ensures(result == 2 * x)]
15-
// #[thrust::ensures(is_double(x, result))]
13+
#[thrust::ensures(is_double(x, result))]
1614
fn double(x: i64) -> i64 {
1715
x + x
1816
}
1917

2018
fn main() {
2119
let a = 3;
2220
assert!(double(a) == 6);
23-
assert!(is_double(a, double(a)));
2421
}

0 commit comments

Comments
 (0)