LeetCode 1765. 地图中的最高点
更多...
|
| TEST (map_of_highest_peak, case1) |
|
| TEST (map_of_highest_peak, case2) |
|
◆ TEST() [1/2]
leetcode::map_of_highest_peak::TEST |
( |
map_of_highest_peak |
, |
|
|
case1 |
|
|
) |
| |
在文件 leetcode_test.cpp 第 1102 行定义.
1103 int input[2][2] = {{0, 1}, {0, 0}};
1104 auto vec_in = vector<vector<int>>();
1106 for(
int i = 0; i < 2; i++) {
1107 vec_in[i] = vector(begin(input[i]), end(input[i]));
1109 int output[2][2] = {{1, 0}, {2, 1}};
1110 auto vec_out = vector<vector<int>>();
1112 for(
int i = 0; i < 2; i++) {
1113 vec_out[i] = vector(begin(output[i]), end(output[i]));
1115 ASSERT_EQ(vec_out, Solution::highestPeak(vec_in));
引用了 leetcode::map_of_highest_peak::Solution::highestPeak().
◆ TEST() [2/2]
leetcode::map_of_highest_peak::TEST |
( |
map_of_highest_peak |
, |
|
|
case2 |
|
|
) |
| |
在文件 leetcode_test.cpp 第 1118 行定义.
1119 int input[3][3] = {{0, 0, 1}, {1, 0, 0}, {0, 0, 0}};
1120 auto vec_in = vector<vector<int>>();
1122 for(
int i = 0; i < 3; i++) {
1123 vec_in[i] = vector(begin(input[i]), end(input[i]));
1125 int output[3][3] = {{1, 1, 0}, {0, 1, 1}, {1, 2, 2}};
1126 auto vec_out = vector<vector<int>>();
1128 for(
int i = 0; i < 3; i++) {
1129 vec_out[i] = vector(begin(output[i]), end(output[i]));
1131 ASSERT_EQ(vec_out, Solution::highestPeak(vec_in));
引用了 leetcode::map_of_highest_peak::Solution::highestPeak().