79 std::vector<std::vector<int32_t>>
matrix = {{1, 10, 100, 1000, 10000},
80 {2, 20, 200, 2000, 20000},
81 {3, 30, 300, 3000, 30000},
82 {4, 40, 400, 4000, 40000},
83 {5, 50, 500, 5000, 50000}};
85 std::pair<uint32_t, uint32_t> not_found = std::make_pair(0, 0);
86 std::pair<uint32_t, uint32_t> test_answer;
88 std::pair<uint32_t, uint32_t> answer1 =
89 search::saddleback::saddleback(
matrix, 123);
90 assert(not_found == answer1);
92 answer1 = search::saddleback::saddleback(
matrix, 0);
93 assert(not_found == answer1);
95 answer1 = search::saddleback::saddleback(
matrix, 1);
96 test_answer = std::make_pair(1, 1);
97 assert(test_answer == answer1);
99 answer1 = search::saddleback::saddleback(
matrix, 50000);
100 test_answer = std::make_pair(5, 5);
101 assert(test_answer == answer1);
103 answer1 = search::saddleback::saddleback(
matrix, 300);
104 test_answer = std::make_pair(3, 3);
105 assert(test_answer == answer1);