leetcode/tests/s0283_move_zeroes.cpp

20 lines
349 B
C++
Raw Normal View History

2022-11-24 09:21:25 +00:00
#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};
2022-11-30 10:20:36 +00:00
S0283 solution;
2022-11-24 09:21:25 +00:00
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}
TEST(Problem283, Case2) {
vector<int> i{0};
vector<int> o{0};
2022-11-30 10:20:36 +00:00
S0283 solution;
2022-11-24 09:21:25 +00:00
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}