<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">It’s the magic of parse transforms!<div class=""><br class=""></div><div class="">eunit.erl includes eunit.hrl: <a href="https://github.com/erlang/otp/blob/8e4abc44d58e61753716e63b23c6b44d221feb15/lib/eunit/src/eunit.erl#L30" class="">https://github.com/erlang/otp/blob/8e4abc44d58e61753716e63b23c6b44d221feb15/lib/eunit/src/eunit.erl#L30</a></div><div class=""><br class=""></div><div class="">When you include that header file, it will create a test/0 function for you.</div><div class="">Check it out: <a href="http://erlang.org/doc/apps/eunit/chapter.html#running-eunit" class="">http://erlang.org/doc/apps/eunit/chapter.html#running-eunit</a></div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><span id="docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad" class=""><span style="font-size: 11pt; font-family: Arial; font-weight: 700; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class=""><br class="Apple-interchange-newline"><hr class=""></span></span><div class=""><b class=""><i class=""><a href="http://about.me/elbrujohalcon" class="">Brujo Benavides</a></i></b></div></div></div><div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><b class=""><br class=""></b></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 15 Nov 2019, at 17:24, Roger Lipscombe <<a href="mailto:roger@differentpla.net" class="">roger@differentpla.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">1> eunit:test().<br class="">  All 6 tests passed.<br class="">ok<br class=""><br class="">But there's no `test/0` function *in* eunit.erl. What's going on?<br class=""></div></div></blockquote></div><br class=""></div></body></html>