Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "gtest/gtest.h"
- #include "../solution.h"
- TEST(Test, Sample1) {
- solution sol;
- std::vector<int> input{16, 16, 17};
- std::vector<int> expected{17, 17, -1};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
- TEST(Test, Sample2) {
- solution sol;
- std::vector<int> input{12, 13, 11, 15, 15, 17, 16, 15, 19};
- std::vector<int> expected{13, 15, 15, 16, 16, 19, 19, 19, -1};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
- TEST(Test, Sample3) {
- solution sol;
- std::vector<int> input{1, 2, 3, 4, 5, 6, 7, 8};
- std::vector<int> expected{2, 3, 4, 5, 6, 7, 8, -1};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
- TEST(Test, Sample4) {
- solution sol;
- std::vector<int> input{8, 7, 6, 5, 4, 3, 2, 1};
- std::vector<int> expected{-1, -1, -1, -1, -1, -1, -1, -1};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
- TEST(Test, Sample5) {
- solution sol;
- std::vector<int> input{};
- std::vector<int> expected{};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
- TEST(Test, Sample6) {
- solution sol;
- std::vector<int> input{1, 1, 1, 1, 1, 1, 1};
- std::vector<int> expected{-1, -1, -1, -1, -1, -1, -1};
- auto output = sol.minimal_larger_suffix(input);
- EXPECT_EQ(output, expected);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement