Remove elements

This commit is contained in:
2022-11-24 17:21:25 +08:00
parent 56880d0095
commit 1e65cff7e5
6 changed files with 72 additions and 12 deletions

View File

@@ -0,0 +1,19 @@
#include "s0283_move_zeroes.hpp"
#include <gtest/gtest.h>
TEST(Problem283, Case1) {
vector<int> i{0, 1, 0, 3, 12};
vector<int> o{1, 3, 12, 0, 0};
Solution solution;
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}
TEST(Problem283, Case2) {
vector<int> i{0};
vector<int> o{0};
Solution solution;
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}