leetcode/tests/s0739_daily_temperatures.cpp
Sainnhe Park ac57b13edb
All checks were successful
continuous-integration/drone/push Build is passing
s0739
2022-12-16 15:08:10 +08:00

25 lines
663 B
C++

#include "s0739_daily_temperatures.hpp"
#include <gtest/gtest.h>
TEST(Problem739, Case1) {
vector<int> temperatures{73, 74, 75, 71, 69, 72, 76, 73};
vector<int> expected{1, 1, 4, 2, 1, 1, 0, 0};
S0739 solution;
EXPECT_EQ(solution.dailyTemperatures(temperatures), expected);
}
TEST(Problem739, Case2) {
vector<int> temperatures{30, 40, 50, 60};
vector<int> expected{1, 1, 1, 0};
S0739 solution;
EXPECT_EQ(solution.dailyTemperatures(temperatures), expected);
}
TEST(Problem739, Case3) {
vector<int> temperatures{30, 60, 90};
vector<int> expected{1, 1, 0};
S0739 solution;
EXPECT_EQ(solution.dailyTemperatures(temperatures), expected);
}