87 std::int64_t number = 1234567890;
88 std::vector<std::int64_t> expectedReverse = {0, 9, 8, 7, 6, 5, 4, 3, 2, 1};
89 std::vector<std::int64_t> expectedForward = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
90 std::vector<std::int64_t> reverseOrder =
92 assert(reverseOrder == expectedReverse);
93 std::vector<std::int64_t> forwardOrder =
95 assert(forwardOrder == expectedForward);
99 expectedReverse = {5};
100 expectedForward = {5};
102 assert(reverseOrder == expectedReverse);
104 assert(forwardOrder == expectedForward);
108 expectedReverse = {0};
109 expectedForward = {0};
111 assert(reverseOrder == expectedReverse);
113 assert(forwardOrder == expectedForward);
116 number = 987654321012345;
117 expectedReverse = {5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
118 expectedForward = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5};
120 assert(reverseOrder == expectedReverse);
122 assert(forwardOrder == expectedForward);
125 number = -987654321012345;
126 expectedReverse = {5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
127 expectedForward = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5};
129 assert(reverseOrder == expectedReverse);
131 assert(forwardOrder == expectedForward);