[erlang-patches] break out assert macros from eunit

Fredrik <>
Fri Apr 19 14:33:28 CEST 2013


On 01/28/2013 11:58 AM, Fredrik wrote:
> On 01/28/2013 11:27 AM, Richard Carlsson wrote:
>> Done, please refetch.
>>
>>    /Richard
>>
>> On 2013-01-28 11:00 , Fredrik wrote:
>>> On 01/26/2013 10:47 PM, Richard Carlsson wrote:
>>>> (New attempt with this branch, freshly rebased on master.)
>>>>
>>>> Several people have requested that the assert macros in eunit 
>>>> should be
>>>> moved out to a separate header file. The following branch puts them in
>>>> stdlib/include/assert.hrl:
>>>>
>>>>    git fetch git://github.com/richcarl/otp.git break-out-asserts
>>>>
>>>> I added a test, but there is no documentation: I don't know quite 
>>>> where
>>>> to put that, since it's just a header file and no module. However, 
>>>> they
>>>> are described in the EUnit documentation.
>>>>
>>>>     /Richard
>>> Hello,
>>> Your patch fails to build:
>>>
>>> stdlib_test ../stdlib_test/stdlib_SUITE.erl:140: can't find include lib
>>> "stdlib/include/assert.hrl"
>>> ../stdlib_test/stdlib_SUITE.erl:141: can't find include lib
>>> "stdlib/include/assert.hrl"
>>> ../stdlib_test/stdlib_SUITE.erl:147: undefined macro 'assert/1'
>>> ../stdlib_test/stdlib_SUITE.erl:36: function assert_test/1 undefined
>>>
>>>
>>> We distinguished that the hrl file needs to be included in
>>> lib/stdlib/src/Makefile
>>>
>>> Could you fix this?
>>>
> Refetched,
> Thanks.
>
Hello Richard,
I've got some feedback on your patch:
*We need documentation regarding this in the STDLIB ref. man.
*More tests, the ones that are there right now is only testing that any 
of the macro's crashes. ( and also, we need testing of fault scenarios, 
does these getting catched as they should?)

-- 

BR Fredrik Gustafsson
Erlang OTP Team



More information about the erlang-patches mailing list