Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::{Path};
use llir::*;

#[test]
fn get_function_1() -> Result<(), String> {
  let ctx = Context::create();
  let module = ctx.load_module(Path::new("tests/c_files/br/br_1.bc"))?;
  let _ = module.get_function("main").unwrap();
  Ok(())
}

#[test]
fn get_global_1() -> Result<(), String> {
  let ctx = Context::create();
  let module = ctx.load_module(Path::new("tests/c_files/lock/lock_with_global.bc"))?;
  let _ = module.get_global_variable("global_lock").unwrap();
  Ok(())
}