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