Skip to content

Commit 2b90d64

Browse files
committed
Change C smoke-test file path so the tests don't fail trying to open the file
1 parent bfebe82 commit 2b90d64

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/libcprover-rust/other/example.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// File just to allow smoke testing of Rust API while tests are run.
2+
3+
int main(int argc, char *argv[])
4+
{
5+
int arr[] = {0, 1, 2, 3};
6+
__CPROVER_assert(arr[3] != 3, "expected failure: arr[3] == 3");
7+
}

src/libcprover-rust/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mod tests {
5555
#[test]
5656
fn translate_vector_of_rust_string_to_cpp() {
5757
let vec: Vec<String> = vec![
58-
"/tmp/example.c".to_owned(),
58+
"other/example.c".to_owned(),
5959
"/tmp/example2.c".to_owned()];
6060

6161
let vect = ffi::translate_vector_of_string(vec);
@@ -71,7 +71,7 @@ mod tests {
7171
};
7272

7373
let vec: Vec<String> = vec![
74-
"/tmp/example.c".to_owned()];
74+
"other/example.c".to_owned()];
7575

7676
let vect = ffi::translate_vector_of_string(vec);
7777
assert_eq!(vect.len(), 1);
@@ -91,7 +91,7 @@ mod tests {
9191
let client = ffi::new_api_session();
9292

9393
let vec: Vec<String> = vec![
94-
"/tmp/example.c".to_owned()];
94+
"other/example.c".to_owned()];
9595

9696
let vect = ffi::translate_vector_of_string(vec);
9797
client.load_model_from_files(vect);
@@ -114,7 +114,7 @@ mod tests {
114114
};
115115

116116
let vec: Vec<String> = vec![
117-
"/tmp/example.c".to_owned()];
117+
"other/example.c".to_owned()];
118118

119119
let vect = ffi::translate_vector_of_string(vec);
120120
assert_eq!(vect.len(), 1);

0 commit comments

Comments
 (0)