leetcode/tests/s0283_move_zeroes.cpp

20 lines
349 B
C++

#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};
S0283 solution;
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}
TEST(Problem283, Case2) {
vector<int> i{0};
vector<int> o{0};
S0283 solution;
solution.moveZeroes(i);
EXPECT_EQ(i, o);
}