25 lines
574 B
C++
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);
|
||
|
}
|