Mojo function
assert_is_not
assert_is_not[T: StringableIdentifiable](lhs: T, rhs: T, msg: String = "", *, location: Optional[_SourceLocation] = #kgen.none)
Asserts that the input values have different identities. If they do not then an Error is raised.
Parameters:
- βT (
StringableIdentifiable
): A StringableIdentifiable type.
Args:
- βlhs (
T
): The lhs of theis not
statement. - βrhs (
T
): The rhs of theis not
statement. - βmsg (
String
): The message to be printed if the assertion fails. - βlocation (
Optional[_SourceLocation]
): The location of the error (default to the__call_location
).
Raises:
An Error with the provided message if assert fails and None
otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
π What went wrong?