[BFL] [Bug 298] BFL needs unit testing framework

For more information about this bug, visit
A comment was added:
------- Comment #10 from tinne [dot] delaet [..] ... 2007-04-19 14:45

I added the proposed patch to the trunk and I also adaptations for the
sample_test which I proposed previously ...

wmeeusse's picture

[Bug 298] BFL needs unit testing framework

For more information about this bug, visit

wim [dot] meeussen [..] ... changed:

What |Removed |Added
---------------------------------------------------------------------------
Resolution| |FIXED
Status|ASSIGNED |RESOLVED

------- Comment #13 from wim [dot] meeussen [..] ... 2007-05-03 14:20

BFL now has a unit testing framework!

More tests are still welcome.

Fwd: [Bug 298] BFL needs unit testing framework

Forgot to cc: the ML

---------- Forwarded message ----------
From: Klaas Gadeyne <klaas [dot] gadeyne [..] ...>
Date: Apr 27, 2007 1:09 PM
Subject: Re: [BFL] [Bug 298] BFL needs unit testing framework
To: Tinne De Laet <tinne [dot] delaet [..] ...>

On 27 Apr 2007 09:35:51 -0000, Tinne De Laet
<tinne [dot] delaet [..] ...> wrote:
>
> In revision 8244 I implemented unit tests for the conditionalgaussian, the discretepdf and the discreteconditionalpdf: See below.
> Any feedback is welcome.
>
> __________________________________
> Sending ChangeLog
> Sending tests/pdf_test.cpp
> Sending tests/pdf_test.hpp
> Transmitting file data ...
> Committed revision 8244.

One thing that occurred to me when reviewing this patch is that we
don't check this fact...

[kgad@ampere ~/SVN/bfl-trunk/src/pdf]$
svn diff
Index: discretepdf.h
===================================================================

Fwd: [Bug 298] BFL needs unit testing framework

> One thing that occurred to me when reviewing this patch is that we
> don't check this fact...
>
> [kgad@ampere ~/SVN/bfl-trunk/src/pdf]$
> svn diff
> Index: discretepdf.h
> ===================================================================

[Bug 298] BFL needs unit testing framework

For more information about this bug, visit
A comment was added:
------- Comment #11 from tinne [dot] delaet [..] ... 2007-04-24 16:28

How is the status of the cpp-unit test programs?
Need any help in this matter?

[Bug 298] BFL needs unit testing framework

For more information about this bug, visit
A comment was added:
------- Comment #12 from klaas [dot] gadeyne [..] ... 2007-04-24 17:54

(In reply to comment #11)
> How is the status of the cpp-unit test programs?
> Need any help in this matter?

I haven't written any further test programs. The structure is there. I've
tested it on the latest trunk and all went wel (Debian testing). I'll try to
find some time now and then to add more tests, but adding tests should be
"trivial" given the current status of this code and anyone can contribute to
that.

[Bug 298] BFL needs unit testing framework

Hi,

During constructing some extra cppunit test I encountered the following
problem:

Test name: PdfTest::testMcpdf
equality assertion failed
- Expected: ((0.00868995 0.0014514)
(0.0014514 0.0125358))
- Actual : ((0.00868995 0.0014514)
(0.0014514 0.0125358))

Failures !!!
Run: 9 Failure total: 1 Failures: 1 Errors: 0

[Bug 298] BFL needs unit testing framework

On 4/30/07, Tinne De Laet <tinne [dot] delaet [..] ...> wrote:
> During constructing some extra cppunit test I encountered the following
> problem:
>
> Test name: PdfTest::testMcpdf
> equality assertion failed
> - Expected: ((0.00868995 0.0014514)
> (0.0014514 0.0125358))
> - Actual : ((0.00868995 0.0014514)
> (0.0014514 0.0125358))
>
> Failures !!!
> Run: 9 Failure total: 1 Failures: 1 Errors: 0

[Bug 298] BFL needs unit testing framework

On Monday 30 April 2007 17:41:41 Tinne De Laet wrote:
> Hi,
>
> During constructing some extra cppunit test I encountered the following
> problem:
>
> Test name: PdfTest::testMcpdf
> equality assertion failed
> - Expected: ((0.00868995 0.0014514)
> (0.0014514 0.0125358))
> - Actual : ((0.00868995 0.0014514)
> (0.0014514 0.0125358))
>
> Failures !!!
> Run: 9 Failure total: 1 Failures: 1 Errors: 0

[Bug 298] BFL needs unit testing framework

In revision 8244 I implemented unit tests for the conditionalgaussian, the discretepdf and the discreteconditionalpdf: See below.
Any feedback is welcome.

__________________________________
Sending ChangeLog
Sending tests/pdf_test.cpp
Sending tests/pdf_test.hpp
Transmitting file data ...
Committed revision 8244.
__________________________________

Tinne

[Bug 298] BFL needs unit testing framework

> > In revision 8244 I implemented unit tests for the conditionalgaussian, the discretepdf and the discreteconditionalpdf: See below.
> > Any feedback is welcome.

[...]
This patch also hardens the test somewhat after modifying the api and
anticipates problems if someone would alter one of the defines at the
top of the test.

svn diff tests/pdf_test.cpp
Index: tests/pdf_test.cpp
===================================================================

[Bug 298] BFL needs unit testing framework

On Friday 27 April 2007 13:16:48 Klaas Gadeyne wrote:
> > > In revision 8244 I implemented unit tests for the conditionalgaussian,
> > > the discretepdf and the discreteconditionalpdf: See below. Any feedback
> > > is welcome.
>
> [...]
> This patch also hardens the test somewhat after modifying the api and
> anticipates problems if someone would alter one of the defines at the
> top of the test.
>
> svn diff tests/pdf_test.cpp
> Index: tests/pdf_test.cpp
> ===================================================================

[Bug 298] BFL needs unit testing framework

> I suggest I apply the patches you proposed to the trunk.
> If we finally decide in the future on the use of int and unsigned ints, all
> classed need a major review anyway, so the changes can be done in due
> course.

Patch for discretepdf* applied in Revision 8248:
_______________________________________
svn commit
Sending ChangeLog
Sending src/pdf/discretepdf.cpp
Sending src/pdf/discretepdf.h
Transmitting file data ...
Committed revision 8248.
_______________________________________

Patch for pdf_test* applied in Revision 8249:
_______________________________________

svn commit
Sending ChangeLog
Sending tests/pdf_test.cpp
Transmitting file data ..
Committed revision 8249.
_______________________________________

Tinne

_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm