8#ifndef SEN_LIBS_GEN_TEST_MKDOCS_FIXTURE_TEST_H
9#define SEN_LIBS_GEN_TEST_MKDOCS_FIXTURE_TEST_H
21#include <gtest/gtest.h>
22#include <nlohmann/json.hpp>
33 void generateStl(
const std::string& stl, std::string title =
"Documentation")
37 statements_ = parser.
parse();
41 ASSERT_NE(resolver.
resolve({}),
nullptr);
46 void generateFom(
const std::vector<std::filesystem::path>& paths, std::string title =
"Documentation")
52 [[nodiscard]] std::size_t
find(
const std::string& phrase, std::size_t from = 0)
const
54 return content_.find(phrase, from);
57 [[nodiscard]] std::string
content()
const {
return content_; }
59 [[nodiscard]] std::filesystem::path
archivePath()
const {
return TEST_DATA_DIR; }
62 std::vector<sen::lang::StlStatement> statements_;
Definition mkdocs_fixture_test.h:31
void generateFom(const std::vector< std::filesystem::path > &paths, std::string title="Documentation")
Definition mkdocs_fixture_test.h:46
std::string content() const
Definition mkdocs_fixture_test.h:57
void generateStl(const std::string &stl, std::string title="Documentation")
Definition mkdocs_fixture_test.h:33
std::filesystem::path archivePath() const
Definition mkdocs_fixture_test.h:59
std::size_t find(const std::string &phrase, std::size_t from=0) const
Definition mkdocs_fixture_test.h:52
Renders an MkDocs-compatible markdown document out of sen type sets. Stateful (caches the loaded inja...
Definition mkdocs.h:23
std::string generate(const sen::lang::TypeSetContext &typeSets, const std::string &title)
Renders a single markdown document covering every type set in the supplied context....
Parses STL types and queries out of a list of tokens.
Definition stl_parser.h:30
std::vector< StlStatement > parse()
Parse the tokens given in the constructor into a set of statements.
Resolves a list of statements into a set of types.
Definition stl_resolver.h:110
const TypeSet * resolve(const TypeSettings &settings)
Do the resolution based on the inputs passed on the constructor.
Converts a string into a list of tokens.
Definition stl_scanner.h:31
const StlTokenList & scanTokens()
Scans the string. Throws in case of error.
The set of types used during resolution.
Definition stl_resolver.h:52
TypeSetContext parseFomDocuments(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &extensions, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Definition fom_parser.h:57
The environment where a resolution takes place.
Definition stl_resolver.h:44
Definition stl_resolver.h:103