asserts.warningFree
Check that a command completes without warning.
📝Syntax
asserts.warningFree(command)
[res, msg] = asserts.warningFree(command)
📥Input Arguments
Parameter Description
command Command string evaluated in the current context.
📤Output Arguments
Parameter Description
res true if the assertion passes, false otherwise.
msg assertion failure message, empty on success.
📄Description

The assertion passes when the command emits no warning and raises no error.

Unexpected warnings are returned in msg when outputs are requested.

💡Examples
Warning-free command
asserts.warningFree('1 + 1');
Capture an unexpected warning
[res, msg] = asserts.warningFree('warning(''Nelson:asserts:example'', ''expected warning'');');
🔗See Also
asserts.warning
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub