diff options
| author | Eugen Wissner <belka@caraus.de> | 2021-06-04 09:37:50 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2021-06-04 09:37:50 +0200 |
| commit | 01550390718185445b2f852fd84d184a9c5eba76 (patch) | |
| tree | 8390cb9ec6cbdabcee1337e545a6e5990fa21116 /tests | |
| parent | c15a8993ecc3c6dfdba430cca331534a1eef3ed8 (diff) | |
| download | tanya-01550390718185445b2f852fd84d184a9c5eba76.tar.gz | |
Replace rotate with bringToFront
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tanya/algorithm/tests/mutation.d | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/tanya/algorithm/tests/mutation.d b/tests/tanya/algorithm/tests/mutation.d index 4403dd7..bc1ee0e 100644 --- a/tests/tanya/algorithm/tests/mutation.d +++ b/tests/tanya/algorithm/tests/mutation.d @@ -95,38 +95,3 @@ import tanya.test.stub; NonCopyable[] nonCopyable; initializeAll(nonCopyable); } - -@nogc nothrow pure @safe unittest -{ - import std.algorithm.comparison : equal; - - const int[5] expected = [1, 2, 3, 4, 5]; - int[5] actual = [4, 5, 1, 2, 3]; - - rotate(actual[0 .. 2], actual[2 .. $]); - assert(equal(actual[], expected[])); -} - -// Doesn't cause an infinite loop if back is shorter than the front -@nogc nothrow pure @safe unittest -{ - import std.algorithm.comparison : equal; - - const int[5] expected = [1, 2, 3, 4, 5]; - int[5] actual = [3, 4, 5, 1, 2]; - - rotate(actual[0 .. 3], actual[3 .. $]); - assert(equal(actual[], expected[])); -} - -// Doesn't call .front on an empty front -@nogc nothrow pure @safe unittest -{ - import std.algorithm.comparison : equal; - - const int[2] expected = [2, 8]; - int[2] actual = expected; - - rotate(actual[0 .. 0], actual[]); - assert(equal(actual[], expected[])); -} |
