2022-11-03 07:22:56 +00:00
|
|
|
#include "s0011_container_with_most_water.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem11, Case1) {
|
|
|
|
vector<int> height{1, 8, 6, 2, 5, 4, 8, 3, 7};
|
|
|
|
int o{49};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0011 solution;
|
2022-11-03 07:22:56 +00:00
|
|
|
EXPECT_EQ(solution.maxArea(height), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem11, Case2) {
|
|
|
|
vector<int> height{1, 1};
|
|
|
|
int o{1};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0011 solution;
|
2022-11-03 07:22:56 +00:00
|
|
|
EXPECT_EQ(solution.maxArea(height), o);
|
|
|
|
}
|