Skip to content

Commit

Permalink
rewrite pass-non-c-like-enum-to-c to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 17, 2024
1 parent 2f31447 commit 6423fd9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/run-make/pass-non-c-like-enum-to-c/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Similar to the `return-non-c-like-enum-from-c` test, where
// the C code is the library, and the Rust code compiles
// into the executable. Once again, enum variants should be treated
// like an union of structs, which should prevent segfaults or
// unexpected results. The only difference with the aforementioned
// test is that the structs are passed into C directly through the
// `tt_add` and `t_add` function calls.
// See https://github.com/rust-lang/rust/issues/68190

//@ ignore-cross-compile
// Reason: the compiled binary is executed

use run_make_support::{build_native_static_lib, run, rustc};

fn main() {
build_native_static_lib("test");
rustc().input("nonclike.rs").arg("-ltest").run();
run("nonclike");
}

0 comments on commit 6423fd9

Please sign in to comment.