mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
report panicking tests (not pretty yet)
This commit is contained in:
parent
3129225951
commit
7e5476aa58
3 changed files with 73 additions and 17 deletions
|
@ -3,6 +3,7 @@ use const_format::concatcp;
|
|||
use inkwell::context::Context;
|
||||
use libloading::Library;
|
||||
use roc_gen_llvm::llvm::build::LlvmBackendMode;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_types::subs::Subs;
|
||||
use rustyline::highlight::{Highlighter, PromptInfo};
|
||||
use rustyline::validate::{self, ValidationContext, ValidationResult, Validator};
|
||||
|
@ -198,7 +199,13 @@ pub fn expect_mono_module_to_dylib<'a>(
|
|||
loaded: MonomorphizedModule<'a>,
|
||||
opt_level: OptLevel,
|
||||
mode: LlvmBackendMode,
|
||||
) -> Result<(libloading::Library, bumpalo::collections::Vec<'a, &'a str>), libloading::Error> {
|
||||
) -> Result<
|
||||
(
|
||||
libloading::Library,
|
||||
bumpalo::collections::Vec<'a, (Symbol, &'a str)>,
|
||||
),
|
||||
libloading::Error,
|
||||
> {
|
||||
let target_info = TargetInfo::from(&target);
|
||||
|
||||
let MonomorphizedModule {
|
||||
|
@ -240,7 +247,7 @@ pub fn expect_mono_module_to_dylib<'a>(
|
|||
// platform to provide them.
|
||||
add_default_roc_externs(&env);
|
||||
|
||||
let expects = roc_gen_llvm::llvm::build::build_procedures_expose_expects(
|
||||
let expect_names = roc_gen_llvm::llvm::build::build_procedures_expose_expects(
|
||||
&env,
|
||||
opt_level,
|
||||
&toplevel_expects,
|
||||
|
@ -248,6 +255,11 @@ pub fn expect_mono_module_to_dylib<'a>(
|
|||
entry_point,
|
||||
);
|
||||
|
||||
let expects = bumpalo::collections::Vec::from_iter_in(
|
||||
toplevel_expects.into_iter().zip(expect_names.into_iter()),
|
||||
env.arena,
|
||||
);
|
||||
|
||||
env.dibuilder.finalize();
|
||||
|
||||
// we don't use the debug info, and it causes weird errors.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue