%% @author alexeikrasnopolski %% @doc @todo Add description to macro_test. -module(macro_test). -include_lib("eunit/include/eunit.hrl"). -define(macro1(A, B), io:format(user, "~p~p~n", [A,B])). -define(macro2, macro_replacement(A, B) -> begin A + B end). %% ==================================================================== %% API functions %% ==================================================================== -export([]). macro_test_() -> [ {"1. example", fun run/0} ]. run() -> A = "A= ", ?macro1(A, 5), io:format(user, "a: ~p~p~n", ["A= ", macro_replacement(2, 3)]). %% ==================================================================== %% Internal functions %% ==================================================================== ?macro2. a() -> ok.