{% namespace tests.variables %}

{% macro constvar() %}Hello{% endmacro %}

{% macro var1(name) %}Hello {{ name }}{% endmacro %}

{% macro add1(num) %}{{ num + 10 }}{% endmacro %}

{% macro add2(num, step) %}{{ num + step }}{% endmacro %}

{% macro sub1(num, step) %}{{ num - step }}{% endmacro %}

{% macro div1(num, step) %}{{ num / step }}{% endmacro %}

{% macro floordiv1(n1, n2) %}{{ n1 // n2 }}{% endmacro %}

{% macro pow1(num, power) %}{{ num ** power }}{% endmacro %}

{% macro mod1(n1, n2) %}{{ n1 % n2 }}{% endmacro %}

{% macro order1(n1, n2) %}{{ (n1 + n2) ** 2 }}{% endmacro %}
{% macro order2(n1, n2) %}{{ (n1 + (n2 ** 2)) }}{% endmacro %}
{% macro order3(n1, n2, n3) %}{{ n1 + n2 * n3 }}{% endmacro %}
{% macro order4(n1, n2, n3) %}{{ (n1 + n2) * n3 }}{% endmacro %}

{% macro unaryminus1(num) %}{{ -num + 15 }}{% endmacro %}
{% macro unaryminus2(num) %}{{ +num + 15 }}{% endmacro %}
{% macro unarynot(bool) %}{{ not bool }}{% endmacro %}

{% macro defaultparam1(name = "World") -%}
Hello {{ name }}!
{%- endmacro %}

{% macro defaultparam2(option = None) -%}
{% if option == None %}Null{% else %}Not null{% endif %}
{%- endmacro %}

{% macro defaultparam3(name = 'Michael', age = 30) -%}
Hello {{ name }} aged {{ age }}
{%- endmacro %}
