mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
* inja2 * header only * reduce dependencies * code cleaning * c++17 * use stdc++ * code cleaning * infrastructure * header only * add infrastructure * fix tests * use minimum clang 6 * code cleaning, polyfill for c++11 * fix some file tests * fix readme * update appveyor * fix polyfill and ci * fix polyfill * fix ci? * test msvc __cplusplus * add doxygen * activate all tests * code cleaning * add coveralls, set default to dot notation * add html test * add doxygen comments * test single_include file * change build folder in appveyor * correct make arguments in appveyor * fix appveyor arguments
26 lines
1.1 KiB
C++
26 lines
1.1 KiB
C++
#include "hayai/hayai.hpp"
|
|
#include <inja/inja.hpp>
|
|
|
|
|
|
using json = nlohmann::json;
|
|
|
|
|
|
inja::Environment env;
|
|
|
|
json data = {{"name", "Peter"}};
|
|
|
|
std::string string_template {"Lorem {{ name }}! Omnis in aut nobis libero enim. Porro optio ratione molestiae necessitatibus numquam architecto soluta. Magnam minus unde quas {{ name }} aspernatur occaecati et voluptas cupiditate. Assumenda ut alias quam voluptate aut saepe ullam dignissimos. \n Sequi aut autem nihil voluptatem tenetur incidunt. Autem commodi animi rerum. {{ lower(name) }} Mollitia eligendi aut sed rerum veniam. Eum et fugit velit sint ratione voluptatem aliquam. Minima sint consectetur natus modi quis. Animi est nesciunt cupiditate nostrum iure. Voluptatem accusamus vel corporis. \n Debitis {{ name }} sunt est debitis distinctio ut. Provident corrupti nihil velit aut tempora corporis corrupti exercitationem. Praesentium cumque ex est itaque."};
|
|
|
|
|
|
BENCHMARK(InjaBenchmarker, render, 10, 100) {
|
|
env.render(string_template, data);
|
|
}
|
|
|
|
int main() {
|
|
hayai::ConsoleOutputter consoleOutputter;
|
|
|
|
hayai::Benchmarker::AddOutputter(consoleOutputter);
|
|
hayai::Benchmarker::RunAllTests();
|
|
return 0;
|
|
}
|