#pragma once #include #include #include #include "llvm/ADT/FunctionExtras.h" #include "llvm/ADT/StringRef.h" namespace clice::testing { enum class TestState { Passed, Skipped, Failed, Fatal, }; struct TestAttrs { bool skip = false; bool focus = false; }; struct TestCase { std::string name; std::string path; std::size_t line; TestAttrs attrs; llvm::unique_function test; }; struct TestSuite { std::string name; std::vector (*cases)(); }; class Runner2 { public: static Runner2& instance(); void add_suite(std::string_view suite, std::vector (*cases)()); int run_tests(llvm::StringRef filter); private: std::vector suites; }; } // namespace clice::testing