Mojo function
assert_false
assert_false[T: Boolable, //](val: T, msg: String = "condition was unexpectedly True", *, location: Optional[_SourceLocation] = #kgen.none)
Asserts that the input value is False and raises an Error if it's not.
Parameters:
- βT (
Boolable
): The type of the value argument.
Args:
- βval (
T
): The value to assert to be False. - β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?