advent-of-code/2022/cpp/07/test.cpp

26 lines
624 B
C++
Raw Normal View History

2023-08-02 11:50:10 +02:00
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../doctest/doctest/doctest.h"
#include "answer.hpp"
#if PART == 1
TEST_CASE("Part 1") {
Input actual_input = get_input("sample1");
std::cout << "actual_input" << std::endl;
std::cout << actual_input << std::endl;
SUBCASE("Testing output is the one expected from AOC") {
CHECK(get_result(actual_input) == "95437");
}
}
#endif
#if PART == 2
TEST_CASE("Part 2") {
Input actual_input = get_input("sample2");
SUBCASE("Testing output is the one expected from AOC") {
CHECK(get_result(actual_input) == "24933642");
}
}
#endif