Assertion Functions
Standard library functions for testing and assertions
assert_eq asserts that two values are equal.
| Name | Type | Description |
|---|
left | any | A value to compare |
right | any | The value to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_eq(action.example.result, 1)
}
assert_ne asserts that two values are not equal.
| Name | Type | Description |
|---|
left | any | A value to compare |
right | any | The value to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_ne(action.example.result, 1)
}
assert_gt asserts that the left value is greater than the right value.
| Name | Type | Description |
|---|
left | integer | float | An integer or float to compare |
right | integer | float | An integer or float to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_gt(action.example.result, 1)
}
assert_gte asserts that the left value is greater than or equal to the right value.
| Name | Type | Description |
|---|
left | integer | float | An integer or float to compare |
right | integer | float | An integer or float to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_gte(action.example.result, 1)
}
assert_lt asserts that the left value is less than the right value.
| Name | Type | Description |
|---|
left | integer | float | An integer or float to compare |
right | integer | float | An integer or float to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_lt(action.example.result, 1)
}
assert_lte asserts that the left value is less than or equal to the right value.
| Name | Type | Description |
|---|
left | integer | float | An integer or float to compare |
right | integer | float | An integer or float to compare against |
| Name | Type | Description |
|---|
value | addon(std::assertion) | The result of the assertion |
output "assertion" {
value = std::assert_lte(action.example.result, 1)
}