leetcode/tests/s0739_daily_temperatures.cpp

25 lines
663 B
C++
Raw Normal View History

2022-12-16 07:08:10 +00:00
#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);
}