Merge lp://staging/~julien-spautz/cable/unit-test-framework into lp://staging/cable

Proposed by Julien Spautz
Status: Merged
Merged at revision: 138
Proposed branch: lp://staging/~julien-spautz/cable/unit-test-framework
Merge into: lp://staging/cable
Diff against target: 774 lines (+506/-183)
10 files modified
CMakeLists.txt (+7/-2)
tests/TestCase.vala (+0/-58)
tests/TestMain.vala (+8/-7)
tests/TestMessageHistory.vala (+76/-85)
tests/TestUpMarker.vala (+85/-31)
unit/Assert.vala (+136/-0)
unit/Test.vala (+16/-0)
unit/TestCase.vala (+123/-0)
unit/TestSuite.vala (+40/-0)
unit/Unit.vala (+15/-0)
To merge this branch: bzr merge lp://staging/~julien-spautz/cable/unit-test-framework
Reviewer Review Type Date Requested Status
Julien Spautz Approve
Review via email: mp+186882@code.staging.launchpad.net

Description of the change

Implemented a new Unit Testing framework similar to JUnit and Gee.TestCase, but eliminating some annoying things about Gee.TestCase.

Main changes compared to Gee.TestCase:

- New Assert methods that show some decent, readable output instead of almost useless lines of valac generated C code, e.g. assert (_tmp_1 <_tmp_2) and that do not abort the program.

- Cleaner interface, no big deal but nice to have.

- set_up and tear_down are executed correctly, added set_up_class and tear_down_class, too.

- Nicer, color coded output.

I also rewrote existing tests for the new framework and added some new tests for the UpMarker class.

To run tests, execute cmake as always and then: make && ./cable_tests

To post a comment you must log in.
139. By Julien Spautz

refactor TestCase.run ()

140. By Julien Spautz

remove redundant error messages and shorten lines in Assert.vala

141. By Julien Spautz

print number of test cases and unit tests at the end

Revision history for this message
Julien Spautz (julien-spautz) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: