leetcode/tests/s1049_last_stone_weight_ii.cpp
Sainnhe Park 8551696b52
All checks were successful
ci/woodpecker/push/test Pipeline was successful
s1049
2023-02-09 15:52:59 +08:00

25 lines
574 B
C++

#include "s1049_last_stone_weight_ii.hpp"
#include <gtest/gtest.h>
TEST(Problem1049, Case1) {
vector<int> stones{2, 7, 4, 1, 8, 1};
int expected{1};
S1049 solution;
EXPECT_EQ(solution.lastStoneWeightII(stones), expected);
}
TEST(Problem1049, Case2) {
vector<int> stones{31, 26, 33, 21, 40};
int expected{5};
S1049 solution;
EXPECT_EQ(solution.lastStoneWeightII(stones), expected);
}
TEST(Problem1049, Case3) {
vector<int> stones{57, 32, 40, 27, 35, 61};
int expected{4};
S1049 solution;
EXPECT_EQ(solution.lastStoneWeightII(stones), expected);
}