Code covered by the BSD License  

Highlights from
MATLAB xUnit Test Framework

image thumbnail

MATLAB xUnit Test Framework

by

 

31 Jan 2009 (Updated )

MATLAB xUnit is a unit test framework for MATLAB code.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

TestUsingTestCase
classdef TestUsingTestCase < TestCase
% Copyright 2013 The MathWorks, Inc.

    properties
        fh
    end

    methods
        function self = TestUsingTestCase(name)
            self = self@TestCase(name);
        end

        function setUp(self)
            self.fh = figure;
        end

        function tearDown(self)
            delete(self.fh);
        end

        function testColormapColumns(self)
            assertEqual(size(get(self.fh, 'Colormap'), 2), 3);
        end

        function testPointer(self)
            assertEqual(get(self.fh, 'Pointer'), 'arrow');
        end
    end
end

Contact us