Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should.containOnly and should.equal fail on a range of ranges #85

Open
trout314 opened this issue Jul 24, 2018 · 0 comments
Open

should.containOnly and should.equal fail on a range of ranges #85

trout314 opened this issue Jul 24, 2018 · 0 comments

Comments

@trout314
Copy link

void main()
{
import std.algorithm : equal, map;
import fluent.asserts : should;
import std.range : iota, array;

auto ror = iota(1,4).map!iota;
assert(ror.equal!equal([[0],[0,1],[0,1,2]]));

// These slowly use up all available memory:
// ror.should.equal(([[0],[0,1],[0,1,2]]));
// ror.should.containOnly(([[0],[0,1],[0,1,2]]));

// However, these work:
ror.map!array.should.containOnly([[0],[0,1],[0,1,2]]);
ror.map!array.should.equal([[0],[0,1],[0,1,2]]);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant