start adding doctests
This commit is contained in:
@@ -5,10 +5,18 @@
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <fstream>
|
||||
#include <utility>
|
||||
|
||||
#define DOCTEST_CONFIG_IMPLEMENT
|
||||
#include <doctest.h>
|
||||
|
||||
namespace aocpp {
|
||||
|
||||
auto Startup(int argc, char ** argv) -> std::istream& {
|
||||
if (std::getenv("DOCTEST")) {
|
||||
exit(doctest::Context{argc, argv}.run());
|
||||
}
|
||||
|
||||
static std::ifstream fin;
|
||||
switch (argc) {
|
||||
case 2: fin = std::ifstream{argv[1]}; return fin;
|
||||
|
Reference in New Issue
Block a user