Code covered by the BSD License  

Highlights from
MATLAB xUnit Test Framework

image thumbnail
from MATLAB xUnit Test Framework by Steve Eddins
MATLAB xUnit is a unit test framework for MATLAB code.

ExceptionNotThrownTest
classdef ExceptionNotThrownTest < TestCase
   methods
      function self = ExceptionNotThrownTest(methodName)
         self = self@TestCase(methodName);
      end
      
      function testThrowsException(self)
         f = @() [];
         assertExceptionThrown(f, 'a:b:c');
      end
   end
end

Contact us at files@mathworks.com