Skip to content
Snippets Groups Projects
Commit 6de8a6eb authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Start work on proper TET -> jTET converter.

Put in the first step of the TET -> jTET converter (giving the table a name).

Also start a test framework using the new MATLAB test framework.  Currently
targeting R2013a, so new parameterized tests.
parent 38af793b
No related branches found
No related tags found
No related merge requests found
function test_results = run
%RUN Runs TET test suite
% Runs all the tests in TET, returning the result.
path = mfilename('fullpath');
path = [path(1:size(path, 2)-13) 'Tests'];
test_results = run(matlab.unittest.TestSuite.fromFolder(path));
end
function outtable = convert_table_to_java_table( intable )
%CONVERT_TABLE_TO_JAVA_TABLE Converts a given table to jTET's representation
% This function converts a table from TET's internal representation to
% jTET's representation, ready for use against any of jTET's tools.
outtable = ca.mcscert.jtet.tabularexpression.Table(intable.function_name, []);
end
classdef BaseConversionTest < matlab.unittest.TestCase
%BASECONVERSIONTEST Base test class for conversion to jTET format
% This contains all the common code for doing jTET conversion tests.
properties (Abstract)
File
TableName
end
properties
ConvertedTable = []
end
methods (TestClassSetup)
function setupOnce(testcase)
data = load(testcase.File);
testcase.ConvertedTable = TableBlock.convert_table_to_java_table(data.data);
end
end
methods (Test)
function testTableName(testcase)
testcase.assertEqual(char(testcase.ConvertedTable.getTableName()), testcase.TableName);
end
end
end
classdef ConversionTest1 < BaseConversionTest
%CONVERSIONTEST1 Summary of this class goes here
% Detailed explanation goes here
properties
File = 'data/test1data.mat'
TableName = 'Startup_Limiter'
end
end
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment