Skip to content

Commit

Permalink
Another unit test for diverting to an output range
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaLang committed Mar 27, 2014
1 parent cd5baea commit a721914
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion std/range.d
Expand Up @@ -9974,5 +9974,10 @@ unittest
dchar[] asink2 = [];
auto fsink = (dchar c) { asink2 ~= c; };
auto result2 = txt.tee(fsink).array;
assert(equal(txt, result) && (equal(result, asink2)));
assert(equal(txt, result2) && (equal(result2, asink2)));

char[] asink3 = new dchar[](txt.length);
void fsink2(dchar c) { put(asink3, 3); }
auto result3 = txt.tee(&fsink2).array;
assert(equal(txt, result3) && equal(result3, asink3));
}

0 comments on commit a721914

Please sign in to comment.