mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
wip
This commit is contained in:
parent
e947cd78b9
commit
98535bfbce
28 changed files with 6508 additions and 337 deletions
|
@ -537,6 +537,7 @@ pub fn try_run_lib_function<T>(
|
|||
}
|
||||
|
||||
// only used in tests
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn llvm_evals_to<T, U, F>(
|
||||
src: &str,
|
||||
expected: U,
|
||||
|
@ -585,6 +586,7 @@ pub(crate) fn llvm_evals_to<T, U, F>(
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! assert_llvm_evals_to {
|
||||
($src:expr, $expected:expr, $ty:ty, $transform:expr, $ignore_problems:expr) => {
|
||||
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
|
||||
|
@ -649,6 +651,7 @@ macro_rules! assert_evals_to {
|
|||
}};
|
||||
}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! assert_evals_to_erased {
|
||||
($src:expr, $expected:expr, $ty:ty) => {{
|
||||
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
|
||||
|
@ -661,12 +664,16 @@ macro_rules! assert_evals_to_erased {
|
|||
}};
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn identity<T>(value: T) -> T {
|
||||
value
|
||||
}
|
||||
|
||||
#[allow(unused_imports)]
|
||||
pub(crate) use assert_evals_to;
|
||||
#[allow(unused_imports)]
|
||||
pub(crate) use assert_evals_to_erased;
|
||||
#[allow(unused_imports)]
|
||||
pub(crate) use assert_llvm_evals_to;
|
||||
#[cfg(feature = "gen-llvm-wasm")]
|
||||
pub(crate) use assert_wasm_evals_to;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue