Code covered by the BSD License  

Highlights from
XMLTestRunDisplay

XMLTestRunDisplay

by

 

28 Nov 2011 (Updated )

JUnit-style XML logger for MATLAB xunit framework

edu.stanford.covert.util.computerInfoTest
classdef computerInfoTest < TestCase
    methods
        function this = computerInfoTest(name)
            this = this@TestCase(name);
        end
        
        function testComputerInformation(~)
            [userName,hostName,ipAddress] = ...
                edu.stanford.covert.util.computerInfo();
            assertFalse(isempty(userName));
            assertFalse(...
                isempty(regexp(hostName, '[a-zA-Z0-9_-]+', 'once')),...
                ['Host name: ' hostName]);
            assertFalse(...
                isempty(regexp(ipAddress, '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}', 'once')),...
                ['IP Address: ' ipAddress]);
        end
    end
end

Contact us