摘要:
在你的module中添加: -include_lib("eunit/include/eunit.hrl"). 这样就引入了eunit的头文件,此时你的module具有了下面的特性:自动的将以"_test"结尾的函数作为测试函数;为你的module添加并导出了test/0函数;为你提供了丰富的test macro。(自动导出test函数,是通过compile指示符的parse_transform选项进行处理) 阅读全文
摘要:
在你的module中添加: -include_lib("eunit/include/eunit.hrl"). 这样就引入了eunit的头文件,此时你的module具有了下面的特性:自动的将以"_test"结尾的函数作为测试函数;为你的module添加并导出了test/0函数;为你提供了丰富的test macro。(自动导出test函数,是通过compile指示符的parse_transform选项进行处理) 阅读全文
|