There seem to be two different ways to do the same thing when using the AUnit library:
AUnit.Test_Cases.Test_Case type, creating some function tests, then register each tests with the
AUnit.Test_Cases.Register_Tests function. We can then add this Test_Case to a Suite using the function
There some example of this:
(Surprisingly, there no examples using this way in the AUnit repository.)
The other way is to use the
AUnit.Test_Fixtures.Test_Fixture type, creating some function tests. These tests can then be added to a Suite using the generic package
AUnit.Test_Caller with the functions
I can see way of using
The only difference I can see is that, when using the
AUnit.Test_Cases.Test_Case, you can override the
Tear_Down_Case functions. While with the
AUnit.Test_Fixtures.Test_Fixture you can only override the
Tear_Down functions (because the tests are not group under a Test_Case).
Appart from that, I don't really see much difference.
So, what is the use of the
AUnit.Test_Fixtures.Test_Fixture type with the generic package
AUnit.Test_Caller ? Why would use this over the (simpler ?)
AUnit.Test_Cases.Test_Case type ?
Every example I have seen in one format can be transformed into the other (the
Tear_Down_Case set appart). Could give an example which use one but cannot be done by the other ?