12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- Describe(all_left_rotations)
- {
- It(T1){Assert::That(leftRotations("abc"), Equals(std::vector<std::string>({
- "abc",
- "bca",
- "cab"
- })));}
-
- It(T2){Assert::That(leftRotations("abcdef"), Equals(std::vector<std::string>({
- "abcdef",
- "bcdefa",
- "cdefab",
- "defabc",
- "efabcd",
- "fabcde"
- })));}
-
- It(T3){Assert::That(leftRotations("himalaya"), Equals(std::vector<std::string>({
- "himalaya",
- "imalayah",
- "malayahi",
- "alayahim",
- "layahima",
- "ayahimal",
- "yahimala",
- "ahimalay"
- })));}
-
- It(T4){Assert::That(leftRotations("aab"), Equals(std::vector<std::string>({
- "aab",
- "aba",
- "baa"
- })));}
- };
- Describe(all_right_rotations)
- {
- It(T1){Assert::That(rightRotations("abc"), Equals(std::vector<std::string>({
- "abc",
- "cab",
- "bca"
- })));}
-
- It(T2){Assert::That(rightRotations("abcdef"), Equals(std::vector<std::string>({
- "abcdef",
- "fabcde",
- "efabcd",
- "defabc",
- "cdefab",
- "bcdefa"
- })));}
-
- It(T3){Assert::That(rightRotations("himalaya"), Equals(std::vector<std::string>({
- "himalaya",
- "ahimalay",
- "yahimala",
- "ayahimal",
- "layahima",
- "alayahim",
- "malayahi",
- "imalayah"
- })));}
-
- It(T4){Assert::That(rightRotations("aab"), Equals(std::vector<std::string>({
- "aab",
- "baa",
- "aba"
- })));}
- };
|