image thumbnail

Alert Checking

version 1.0.0 (3.69 KB) by Sky Sartorius
Check Matlab code that is supposed to throw errors or warnings.

4 Downloads

Updated 26 Apr 2021

From GitHub

View license on GitHub

Sometimes when testing code, it is desirable to not only make sure that the code executes correctly when it should, but also to check that it throws errors or warning when expected. These simple utilities make it easy to test if the expected alerting behavior takes place.

shoulderror: throws an error if the code executes successfully without error.
shouldwarn: throws an error if the code executes without warning.
shouldalert: throws an error if the code executes without either an error or warning.

Cite As

Sky Sartorius (2021). Alert Checking (https://github.com/sky-s/alert-checking), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.