diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-23 19:01:47 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-24 09:25:34 +0000 |
| commit | d0a70d93282adb3d3a0adb9b17ead93b35639c46 (patch) | |
| tree | 99b938e7b936e0a9c7b1ef074b80ccd9930c4a3e /library/alloc/tests/sort | |
| parent | 48ef38d3503a04e5e18157e664e3e65dc7eca1a5 (diff) | |
| download | rust-d0a70d93282adb3d3a0adb9b17ead93b35639c46.tar.gz rust-d0a70d93282adb3d3a0adb9b17ead93b35639c46.zip | |
Fix testing of the standard library with Emscripten
This does need EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" avoid several OOMs.
Diffstat (limited to 'library/alloc/tests/sort')
| -rw-r--r-- | library/alloc/tests/sort/tests.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/library/alloc/tests/sort/tests.rs b/library/alloc/tests/sort/tests.rs index 4cc79010e8f..d321f8df518 100644 --- a/library/alloc/tests/sort/tests.rs +++ b/library/alloc/tests/sort/tests.rs @@ -11,7 +11,14 @@ use crate::sort::{Sort, known_good_stable_sort, patterns}; #[cfg(miri)] const TEST_LENGTHS: &[usize] = &[2, 3, 4, 7, 10, 15, 20, 24, 33, 50, 100, 171, 300]; -#[cfg(not(miri))] +// node.js gives out of memory error to use with length 1_100_000 +#[cfg(all(not(miri), target_os = "emscripten"))] +const TEST_LENGTHS: &[usize] = &[ + 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 16, 17, 20, 24, 30, 32, 33, 35, 50, 100, 200, 500, 1_000, + 2_048, 5_000, 10_000, 100_000, +]; + +#[cfg(all(not(miri), not(target_os = "emscripten")))] const TEST_LENGTHS: &[usize] = &[ 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 16, 17, 20, 24, 30, 32, 33, 35, 50, 100, 200, 500, 1_000, 2_048, 5_000, 10_000, 100_000, 1_100_000, |
