Assert.IsNot
Name
Mandatory
Description
Default
Type
⬅️ Input
The input can be of any type.
Any
Output ➡️
The output will be the input (passthrough).
Any
Value
No
The value to test against for equality.
none
Any
Break
No
If we should trigger a debug breakpoint on failure.
false
Bool
This assertion is used to check whether the input is different from a given value.
Details
Returns true if the input is not equal to the Value
parameter and false otherwise. The shard also is type sensitive (e.g., 1 | IsNot(1.0) will return true).
If the Break
parameter is set to false - logs an assertion validation error but continues running the programme.
Examples
; :Break = `true`, assertion true
; => log no errors and dont abort program
8 | Assert.IsNot(16 Break: true)
; :Break = `true`, assertion false
; => abort the program
8 | Maybe({
Assert.IsNot(8 Break: true)
})
[error] Failed assertion IsNot, input: 8 not expected: 8
[error] Assert.IsNot -> Error: Assert failed - IsNot, <unknown>:4:3
[warning] Maybe shard Ignored an error: Assert failed - IsNot, line: 3, column: 5, wire: sample-wire
; :Break = `false`, assertion true
; => log no errors and dont abort program
8 | Assert.IsNot(16 Break: false)
; :Break = `false`, assertion false
; => log assertion error but dont abort program
8 | Maybe({
Assert.IsNot(8 Break: false)
})
[error] Failed assertion IsNot, input: 8 not expected: 8
[error] Assert.IsNot -> Error: Assert failed - IsNot, <unknown>:4:3
[warning] Maybe shard Ignored an error: Assert failed - IsNot, line: 3, column: 5, wire: sample-wire