2022-11-15 07:16:56 +00:00
|
|
|
#include "s0026_remove_duplicates_from_sorted_array.hpp"
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
TEST(Problem26, Case1) {
|
|
|
|
vector<int> i{1, 1, 2};
|
|
|
|
int o{2};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0026 solution;
|
2022-11-15 07:16:56 +00:00
|
|
|
EXPECT_EQ(solution.removeDuplicates(i), o);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST(Problem26, Case2) {
|
|
|
|
vector<int> i{0, 0, 1, 1, 1, 2, 2, 3, 3, 4};
|
|
|
|
int o{5};
|
2022-11-30 10:20:36 +00:00
|
|
|
S0026 solution;
|
2022-11-15 07:16:56 +00:00
|
|
|
EXPECT_EQ(solution.removeDuplicates(i), o);
|
|
|
|
}
|