use includes instead of headerize for code
This commit is contained in:
parent
e55c2a81f1
commit
a0005f915c
@ -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)
|
||||
|
@ -31,9 +31,7 @@ int main(int argc, char* argv[]) {
|
||||
("output", po::value<std::string>(), "output file")
|
||||
("namespace", po::value<std::string>(), "namespace to use")
|
||||
("input-string,S", po::value<std::vector<std::string>>(),
|
||||
"files to parse as strings")
|
||||
("input-code,C", po::value<std::vector<std::string>>(),
|
||||
"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::vector<std::string>>()) {
|
||||
std::ifstream input(filename, std::ios::in);
|
||||
output << std::string{(std::istreambuf_iterator<char>(input)),
|
||||
std::istreambuf_iterator<char>()} << std::endl;
|
||||
input.close();
|
||||
}
|
||||
|
||||
if (vm.count("namespace"))
|
||||
output << "}\n";
|
||||
|
||||
|
58
test/test_context.hpp
Normal file
58
test/test_context.hpp
Normal file
@ -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"
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user