Skip to content

Commit 5a28f57

Browse files
authored
Update mir.core dependency (#456)
* Update mir.core dependency * Add UT for filter and each
1 parent 826afe2 commit 5a28f57

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

dub.sdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors "Ilia Ki" "John Michael Hall" "Shigeki Karita" "Sebastian Wilzbach" "And
55
copyright "2020 Ilia Ki, Kaleidic Associates Advisory Limited, Symmetry Investments"
66
license "Apache-2.0"
77

8-
dependency "mir-core" version=">=1.3.5"
8+
dependency "mir-core" version=">=1.5.2"
99

1010
// dflags "-version=MirNoSIMD"
1111
// dflags "-mtriple=aarch64-linux-gnu"

source/mir/algorithm/iteration.d

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,6 +4206,21 @@ unittest {
42064206
assert(z2.equal!equal(result2));
42074207
}
42084208

4209+
// Ensure filter works with each
4210+
version(mir_test)
4211+
@safe pure nothrow
4212+
unittest {
4213+
import mir.ndslice.slice: sliced;
4214+
4215+
int[] result = [3, 4];
4216+
4217+
int[] x = [1, 2, 3];
4218+
auto y = x.filter!"a >= 2";
4219+
y.each!"a++";
4220+
4221+
assert(y.equal(result));
4222+
}
4223+
42094224
/++
42104225
Implements the higher order filter and map function. The predicate and map functions are passed to
42114226
`mir.functional.naryFun`, and can either accept a string, or any callable

0 commit comments

Comments
 (0)