Ivan Krasilnikov wrote:

> I have fixed stylistic issues with this patch and wrote a couple of
> tests for it:
> 
> mfhash_testdir.patch - a simple test for existing test suite which
> inserts many lines into a buffer and verifies the buffer's contents,
> as you suggested to do earlier.
> 
> mfhash_unittest.patch - a more comprehensive test in C which directly
> tests new functions introduced in this patch. I've added 'make
> unittest' build target which compiles and runs it and which is invoked
> as part of 'make test'. I'm building this test by linking it with all
> vim sources which seems to be the easiest way to satisfy various link
> dependencies between vim sources. 'make depend' needs to be re-run
> after applying this patch.

I had a quick look and it looks good.

I think assert.h is not available everywhere.  If you only use the
assert() method, perhaps we can use a configure check and when assert.h
is not available define it ourselves?  This could be in a test.h include
file perhaps, so it can be reused in other unittests.

-- 
WOMAN:   Dennis, there's some lovely filth down here.  Oh -- how d'you do?
ARTHUR:  How do you do, good lady.  I am Arthur, King of the Britons.
         Who's castle is that?
WOMAN:   King of the who?
                                  The Quest for the Holy Grail (Monty Python)

 /// 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

Raspunde prin e-mail lui