diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1b55bf7..d798839 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,9 +4,6 @@ include_directories( ${CMAKE_SOURCE_DIR}/include ${Boost_INCLUDE_DIR}) -add_executable(mstch_benchmark benchmark_main.cpp) -target_link_libraries(mstch_benchmark mstch benchmark) - add_executable(headerize headerize.cpp) target_link_libraries(headerize ${Boost_PROGRAM_OPTIONS_LIBRARY}) @@ -15,7 +12,6 @@ file(GLOB data_files RELATIVE "${CMAKE_SOURCE_DIR}/test/data/*.hpp") foreach(data_file ${data_files}) - list(APPEND genargs "-C${data_file}") string(REGEX REPLACE "\\.hpp" "" test_name "${data_file}") list(APPEND tests "${test_name}") endforeach(data_file) diff --git a/test/headerize.cpp b/test/headerize.cpp index c23e946..4a08e77 100644 --- a/test/headerize.cpp +++ b/test/headerize.cpp @@ -31,9 +31,7 @@ int main(int argc, char* argv[]) { ("output", po::value(), "output file") ("namespace", po::value(), "namespace to use") ("input-string,S", po::value>(), - "files to parse as strings") - ("input-code,C", po::value>(), - "files to parse as code"); + "files to parse as strings"); po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); @@ -62,14 +60,6 @@ int main(int argc, char* argv[]) { input.close(); } - if (vm.count("input-code")) - for (auto& filename: vm["input-code"].as>()) { - std::ifstream input(filename, std::ios::in); - output << std::string{(std::istreambuf_iterator(input)), - std::istreambuf_iterator()} << std::endl; - input.close(); - } - if (vm.count("namespace")) output << "}\n"; diff --git a/test/test_context.hpp b/test/test_context.hpp new file mode 100644 index 0000000..edef5e3 --- /dev/null +++ b/test/test_context.hpp @@ -0,0 +1,58 @@ +#include "data/simple.hpp" +#include "data/empty_string.hpp" +#include "data/multiline_comment.hpp" +#include "data/included_tag.hpp" +#include "data/string_as_context.hpp" +#include "data/falsy_array.hpp" +#include "data/nested_dot.hpp" +#include "data/escaped.hpp" +#include "data/partial_view.hpp" +#include "data/nested_higher_order_sections.hpp" +#include "data/zero_view.hpp" +#include "data/disappearing_whitespace.hpp" +#include "data/ampersand_escape.hpp" +#include "data/falsy.hpp" +#include "data/reuse_of_enumerables.hpp" +#include "data/apostrophe.hpp" +#include "data/grandparent_context.hpp" +#include "data/higher_order_sections.hpp" +#include "data/empty_list.hpp" +#include "data/two_in_a_row.hpp" +#include "data/partial_array_of_partials.hpp" +#include "data/keys_with_questionmarks.hpp" +#include "data/error_not_found.hpp" +#include "data/complex.hpp" +#include "data/double_render.hpp" +#include "data/null_lookup_object.hpp" +#include "data/error_eof_in_tag.hpp" +#include "data/delimiters.hpp" +#include "data/null_view.hpp" +#include "data/null_string.hpp" +#include "data/comments.hpp" +#include "data/null_lookup_array.hpp" +#include "data/section_as_context.hpp" +#include "data/unescaped.hpp" +#include "data/dot_notation.hpp" +#include "data/recursion_with_same_names.hpp" +#include "data/two_sections.hpp" +#include "data/partial_array_of_partials_implicit.hpp" +#include "data/changing_delimiters.hpp" +#include "data/nesting_same_name.hpp" +#include "data/partial_empty.hpp" +#include "data/inverted_section.hpp" +#include "data/nested_iterating.hpp" +#include "data/partial_template.hpp" +#include "data/nesting.hpp" +#include "data/bug_11_eating_whitespace.hpp" +#include "data/implicit_iterator.hpp" +#include "data/whitespace.hpp" +#include "data/array_of_strings.hpp" +#include "data/empty_sections.hpp" +#include "data/context_lookup.hpp" +#include "data/section_functions_in_partials.hpp" +#include "data/partial_whitespace.hpp" +#include "data/backslashes.hpp" +#include "data/error_eof_in_section.hpp" +#include "data/empty_template.hpp" +#include "data/partial_array.hpp" +#include "data/bug_length_property.hpp" diff --git a/test/test_main.cpp b/test/test_main.cpp index f83c407..c9f52e6 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -3,6 +3,7 @@ #include "catch.hpp" #include "json.hpp" #include "mstch/mstch.hpp" +#include "test_context.hpp" #include "test_data.hpp" #include "specs_data.hpp" #include "specs_lambdas.hpp"