Skip to content

Commit

Permalink
chore(ext/ffi): remove flaky test (denoland#15426)
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Aug 8, 2022
1 parent 1025959 commit daaa509
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions ext/ffi/tcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,3 @@ impl Drop for Compiler {
unsafe { tcc_delete(self.inner) };
}
}

#[cfg(test)]
mod test {
use super::*;
use std::ffi::CString;

#[test]
fn test_compiler_jit() {
let p = CString::new(
r#"
#include <stdint.h>
int32_t add(int32_t a, int32_t b) {
return a + b;
}
"#
.as_bytes(),
)
.unwrap();
let sym = CString::new("add".as_bytes()).unwrap();

let mut ctx = Compiler::new().unwrap();
let ops = CString::new("-nostdlib").unwrap();
ctx.set_options(&ops);
assert!(ctx.compile_string(&p).is_ok());
ctx.relocate_and_get_symbol(&sym).unwrap();
}
}

0 comments on commit daaa509

Please sign in to comment.