mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge remote-tracking branch 'origin/trunk' into wasm-test-wasm3
This commit is contained in:
commit
f7d556b0d1
34 changed files with 212 additions and 162 deletions
|
@ -1,13 +1,10 @@
|
|||
#[cfg(feature = "gen-llvm")]
|
||||
use crate::helpers::llvm::assert_evals_to;
|
||||
|
||||
#[cfg(feature = "gen-dev")]
|
||||
use crate::helpers::dev::assert_evals_to;
|
||||
|
||||
#[cfg(feature = "gen-wasm")]
|
||||
use crate::helpers::wasm::assert_evals_to;
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
use indoc::indoc;
|
||||
|
||||
#[cfg(all(test, any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
|
|
|
@ -542,10 +542,7 @@ fn eq_different_rosetrees() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn rosetree_with_tag() {
|
||||
// currently stack overflows in type checking
|
||||
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
|
|
|
@ -1622,7 +1622,6 @@ fn first_int_list() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn first_wildcard_empty_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1671,7 +1670,6 @@ fn last_int_list() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn last_wildcard_empty_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
@ -1720,7 +1718,6 @@ fn get_empty_list() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn get_wildcard_empty_list() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -2464,7 +2464,6 @@ fn expanded_result() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn backpassing_result() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
|
|
|
@ -10,7 +10,7 @@ use crate::helpers::wasm::{assert_evals_to, expect_runtime_error_panic};
|
|||
// use crate::assert_wasm_evals_to as assert_evals_to;
|
||||
use indoc::indoc;
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
use roc_std::{RocList, RocStr};
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1377,7 +1377,6 @@ fn str_to_nat() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "TODO: figure out why returning i128 across FFI boundary is an issue"]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
fn str_to_i128() {
|
||||
assert_evals_to!(
|
||||
|
@ -1395,7 +1394,6 @@ fn str_to_i128() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "TODO: figure out why returning i128 across FFI boundary is an issue"]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
fn str_to_u128() {
|
||||
assert_evals_to!(
|
||||
|
@ -1569,7 +1567,6 @@ fn str_to_f32() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "TODO: figure out why returning i128 across FFI boundary is an issue"]
|
||||
#[cfg(any(feature = "gen-llvm"))]
|
||||
fn str_to_dec() {
|
||||
use roc_std::RocDec;
|
||||
|
|
|
@ -9,7 +9,8 @@ use crate::helpers::wasm::assert_evals_to;
|
|||
|
||||
#[cfg(test)]
|
||||
use indoc::indoc;
|
||||
#[cfg(test)]
|
||||
|
||||
#[cfg(all(test, any(feature = "gen-llvm", feature = "gen-wasm")))]
|
||||
use roc_std::{RocList, RocStr};
|
||||
|
||||
#[test]
|
||||
|
@ -532,14 +533,12 @@ fn if_guard_vanilla() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn when_on_single_value_tag() {
|
||||
// this fails because the switched-on symbol is not defined
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
when Identity 0 is
|
||||
Identity 0 -> 0
|
||||
Identity 0 -> 6
|
||||
Identity s -> s
|
||||
"#
|
||||
),
|
||||
|
@ -1046,9 +1045,7 @@ fn alignment_in_multi_tag_pattern_match() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn phantom_polymorphic() {
|
||||
// see https://github.com/rtfeldman/roc/issues/786 and below
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r"#
|
||||
|
@ -1072,11 +1069,7 @@ fn phantom_polymorphic() {
|
|||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
#[ignore]
|
||||
fn phantom_polymorphic_record() {
|
||||
// see https://github.com/rtfeldman/roc/issues/786
|
||||
// also seemed to hit an issue where we check whether `add`
|
||||
// has a Closure layout while the type is not fully specialized yet
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
use libloading::Library;
|
||||
use roc_build::link::{link, LinkType};
|
||||
use roc_builtins::bitcode;
|
||||
use roc_collections::all::MutMap;
|
||||
use roc_load::Threading;
|
||||
use roc_region::all::LineInfo;
|
||||
use tempfile::tempdir;
|
||||
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
use roc_collections::all::MutMap;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use roc_mono::ir::pretty_print_ir_symbols;
|
||||
|
||||
|
@ -30,11 +32,11 @@ pub fn helper(
|
|||
_leak: bool,
|
||||
lazy_literals: bool,
|
||||
) -> (String, Vec<roc_problem::can::Problem>, Library) {
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::PathBuf;
|
||||
|
||||
let dir = tempdir().unwrap();
|
||||
let filename = PathBuf::from("Test.roc");
|
||||
let src_dir = Path::new("fake/test/path");
|
||||
let src_dir = PathBuf::from("fake/test/path");
|
||||
let app_o_file = dir.path().join("app.o");
|
||||
|
||||
let module_src;
|
||||
|
|
|
@ -50,12 +50,10 @@ fn create_llvm_module<'a>(
|
|||
context: &'a inkwell::context::Context,
|
||||
target: &Triple,
|
||||
) -> (&'static str, String, &'a Module<'a>) {
|
||||
use std::path::Path;
|
||||
|
||||
let target_info = roc_target::TargetInfo::from(target);
|
||||
|
||||
let filename = PathBuf::from("Test.roc");
|
||||
let src_dir = Path::new("fake/test/path");
|
||||
let src_dir = PathBuf::from("fake/test/path");
|
||||
|
||||
let module_src;
|
||||
let temp;
|
||||
|
|
|
@ -69,7 +69,7 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
|
|||
_test_wrapper_type_info: PhantomData<T>,
|
||||
) -> Vec<u8> {
|
||||
let filename = PathBuf::from("Test.roc");
|
||||
let src_dir = Path::new("fake/test/path");
|
||||
let src_dir = PathBuf::from("fake/test/path");
|
||||
|
||||
let module_src;
|
||||
let temp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue