MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / test_macros

Function test_macros

subprojects/llama.cpp/tests/test-jinja.cpp:831–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

829}
830
831static void test_macros(testing & t) {
832 test_template(t, "simple macro",
833 "{% macro greet(name) %}Hello {{ name }}{% endmacro %}{{ greet('World') }}",
834 json::object(),
835 "Hello World"
836 );
837
838 test_template(t, "macro default arg",
839 "{% macro greet(name='Guest') %}Hi {{ name }}{% endmacro %}{{ greet() }}",
840 json::object(),
841 "Hi Guest"
842 );
843}
844
845static void test_namespace(testing & t) {
846 test_template(t, "namespace counter",

Callers

nothing calls this directly

Calls 1

test_templateFunction · 0.85

Tested by

no test coverage detected