MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Tor Didriksen Date:October 21 2009 7:51am
Subject:Re: Unit testing
View as plain text  
On Tue, 20 Oct 2009 17:04:55 +0200, Kristian Nielsen  
<knielsen@stripped> wrote:

> Tor Didriksen <Tor.Didriksen@stripped> writes:
>> I just wrote a couple of tests using gtest,
>> trying to show that it is a lot more expressive than mytap.
>> There are currently *very few* unit tests in the codebase.
>> If people think unit tests are a good idea, then maybe
>> they will actually start writing them, given a better framework.
> Hm. Maybe it is only in the Maria branch that many unit tests have been
> written? But I suppose it will be merged one day (or maybe not).

We currently have only a handfull of unit tests, for about one million  
lines of code.
In the maria branch there's a couple of dozen more tests in  

>> I use as a test runner, so no re-invention there.
> Ah, so is that possible?
> Didn't realise that. If one could use multiple frameworks for writing
> different kinds of unit tests, that could actually be cool... different  
> kinds
> of tests might have different needs.
> Really great if your work can improve unit testing!

Well I hope to!

>  - Kristian.

Guilhem kindly copied my gtest branch from bk-internal to launchpad:

I encourage people to check it out (pun intended)

I implemented the mdl tests for both gtest and mytap,
to illustrate (some of) the benefits of gtest:
  - a rich set of predicates
  - automatic registration of tests
  - nice error reporting whenever a predicate fails
    (with line number, expected and actual values, additional comments)
  - test fixtures, and setup/teardown logic
  - death tests
  - disabled tests
and many more.

I hope to merge this into development branches in the not too distant  

-- didrik
Unit testingTor Didriksen20 Oct
  • Re: Unit testingKristian Nielsen20 Oct
    • Re: Unit testingTor Didriksen20 Oct
      • Re: Unit testingJay Pipes20 Oct
        • Re: Unit testingKristian Nielsen20 Oct
          • Re: Unit testingSergei Golubchik20 Oct
      • Re: Unit testingKristian Nielsen20 Oct
        • Re: Unit testingTor Didriksen21 Oct
  • RE: Unit testingVladislav Vaintroub21 Oct
    • Re: Unit testingTor Didriksen22 Oct