AUnit.Assertions
More...Entities
Constants and variables
Simple types
Access types
Record types
Tagged types
Subprograms
Dispatching subprograms
Generic instantiations
Description
138 | Null_Id : constant Test_Id := 0; |
---|
Throwing_Exception_Proc [source]
- Failure of type AUnit.Test_Results.Test_Failure
- Id of type AUnit.Assertions.Test_Id
Iterator used to retrieve failures.
Test is used as root type for all Test cases, but also for Test fixtures
This allows easy access to all Assert procedures from user tests.
Inherits Test
Inherited by Test_Case, Test_Fixture
Test "Condition" and record "Message" if false.
If the condition is false, an exception is then raised and the running
test is aborted.
- Condition of type Boolean
- Message of type String
- Source of type String
- Line of type Natural
57 | function Assert |
---|
58 | (Condition : Boolean; |
---|
59 | Message : String; |
---|
60 | Source : String := GNAT.Source_Info.File; |
---|
61 | Line : Natural := GNAT.Source_Info.Line) return Boolean; |
---|
Functional version to allow the calling routine to decide whether to
continue or abandon the execution.
- Condition of type Boolean
- Message of type String
- Source of type String
- Line of type Natural
- Return value
Specialized versions of Assert, they call the general version that
takes a Condition as a parameter
- Actual of type String
- Expected of type String
- Message of type String
- Source of type String
- Line of type Natural
Assert_Exception [source]
Test that Proc throws an exception and record "Message" if not.
- Proc of type AUnit.Assertions.Throwing_Exception_Proc
- Message of type String
- Source of type String
- Line of type Natural
Copy From's Id to To so that failures reported via To are identified as
belonging to From.
- From of type AUnit.Assertions.Test
- To of type AUnit.Assertions.Test
The following is used for the non-dispatching Assert methods.
This uses global variables, and thus is incompatible with multitasking.
- Return value
- I of type AUnit.Assertions.Failure_Iter
- Return value
- I of type AUnit.Assertions.Failure_Iter
- Return value
Failures list handling
- I of type AUnit.Assertions.Failure_Iter
Set_Current_Test [source]
- T of type AUnit.Assertions.Test_Access
Clear all failures related to T
- T of type AUnit.Assertions.Test
- T of type AUnit.Assertions.Test
- Return value
The number of failures reported by test
- T of type AUnit.Assertions.Test
- Return value
Init a new test
- T of type AUnit.Assertions.Test
Failure_Lists (generic instantiation) [source]
145 | package Failure_Lists is |
---|
146 | new Ada_Containers.AUnit_Lists (Failure_Elt); |
---|
Container for failed assertion messages per routine
Instantiation of Ada_Containers.AUnit_Lists