Code covered by the BSD License  

Highlights from
Tabular Expression Toolbox

image thumbnail

Tabular Expression Toolbox

by

 

23 Sep 2010 (Updated )

A tool for creating tabular expressions in Matlab/Simulink integrating checking with PVS and CVC3.

testData
function test_suite = testData
initTestSuite;
end

function testConstructor
    d = Data;
    assertEqual(class(d),'Data');
end

function testInit
    d = Data;
    d.init;
    assertEqual(size(d.Grid2.cells,2),1);
    assertEqual(size(d.Grid1.cells,2),1);
    assertEqual(size(d.Grid0.Cells,2),1);
end

function testClone
    d = Data;
    d.init;
    d.function_name = 'test_name';
    d.function_inputs = 'input_test';
    d.checked = 1;
    d.Grid1.cells(1).cond_text = 'test_cond';
    d2 = d.clone([]);
    assertEqual(d2.function_name,'');
    assertEqual(d2.function_inputs,d.function_inputs);
    assertEqual(d2.Grid1.cells(1).cond_text,'test_cond');
end

function testClone2
    d = Data;
    d2 = d.clone;
    assertEqual(d2,[]);
end

function testSave
    d = Data;
    d.init;
    d.function_name = 'test_file';
    d.save;
    assertEqual(exist('test_file.table'),2);
    delete('test_file.table');
end
        

Contact us