2016-01-09 23:01 GMT+03:00 Nikolay Aleksandrovich Pavlov <[email protected]>
:

>
>
> 2016-01-09 21:41 GMT+03:00 Bram Moolenaar <[email protected]>:
>
>>
>> Ben Fritz wrote:
>>
>> > So, is the intent to eventually replace *all* memory allocations with
>> > this no allow testing error handling code? Or just specific areas?
>> > Example, I don't see testing of the error handling in the garbage
>> > collector.
>>
>> That would be a lot of work.  At least this helps someone who wants to
>> get 100% coverage for some part of the code.
>>
>> > Wouldn't it be better to use an enum rather than a comment about the
>> > current max ID? Much easier to search that way and less error-prone.
>>
>> It would require an enum with fixed numbers.  Otherwise removing an
>> entry would break tests, since those will need to use numbers.
>> Might as well just use the number.  It doesn't matter if there are gaps.
>> If the same number is used twice there is no error, but the test might
>> fail.  Or it might just work.
>>
>
> ​One can just export enum via v: variable dictionary. So tests will not
> contain any numbers at all and identifiers can then as well be strings or
> anything else.​
>

​(I meant dictionary in v: variable, like v:alloc_places set to
`{'qf_init_ext:namebuff': 0, 'qf_init_ext:errmsg': 1, …}` for enum values
named like `ALLOC_qf_init_ext__namebuff`.)
​


>
>
>
>>
>> --
>> BEDEVERE: Stand by for attack!!
>>    [CUT TO enormous army forming up.  Trebuchets, rows of PIKEMEN, siege
>>    towers, pennants flying, shouts of "Stand by for attack!"  Traditional
>>    army build-up shots.  The shouts echo across the ranks of the army.
>>    We see various groups reacting, and stirring themselves in readiness.]
>> ARTHUR:   Who are they?
>> BEDEVERE: Oh, just some friends!
>>                  "Monty Python and the Holy Grail" PYTHON (MONTY)
>> PICTURES LTD
>>
>>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net
>>  \\\
>> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
>> \\\
>> \\\  an exciting new programming language -- http://www.Zimbu.org
>> ///
>>  \\\            help me help AIDS victims -- http://ICCF-Holland.org
>> ///
>>
>> --
>> --
>> You received this message from the "vim_dev" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "vim_dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui