On 2015/05/13 07:43:03, dougc wrote:
[...] Yes this sounds good and improved testing performance. Note the test is
still
slow - more testing has been added. The test takes around 5 seconds here. If
you
can give me a realistic time then testing can be scaled to fit? [...]

5 seconds are roughly 2 orders of magnitude to big: If every test we run during "make -j32 qc" took that long, it would roughly take 3.5 hours. So the rule of thumb is that a unit test should take a few dozen ms at most. Of course there is a tension between good test coverage and testing time, but more exhaustive tests
should be split off into something separate (we discussed this several times
already, but I'm not sure what the current state of this is).

What you could do for unit testing is: Generate some sane fixed number (e.g.
1000) of pseudo-random inputs to the function you want to test and check only those, probably for various "interesting" range combinations. This is e.g. the
idea behind Haskell's QuickCheck
(https://hackage.haskell.org/package/QuickCheck), and there are some C++ ports of this which might be worth considering, this kind of testing problem comes up
again and again.

https://codereview.chromium.org/1121573004/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to