Build out MATLAB test framework and core integration coverage
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
classdef Godard_Timing_Recovery_test < matlab.unittest.TestCase
|
||||
% Test class for Godard_Timing_Recovery
|
||||
classdef Godard_Timing_Recovery_test < IMDDTestCase
|
||||
% Auto-generated placeholder for Godard_Timing_Recovery.
|
||||
% Target: C:/Users/Silas/Documents/MATLAB/imdd_simulation/Classes/04_DSP/Timing Recovery/Godard_Timing_Recovery.m
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for Godard_Timing_Recovery
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
methods (Test, TestTags = {'placeholder', 'todo'})
|
||||
function testNotImplemented(testCase)
|
||||
testCase.assumeFail("Tests for Godard_Timing_Recovery are not implemented yet.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
classdef MaxVar_Timing_Recovery_test < matlab.unittest.TestCase
|
||||
% Test class for MaxVar_Timing_Recovery
|
||||
classdef MaxVar_Timing_Recovery_test < IMDDTestCase
|
||||
% Auto-generated placeholder for MaxVar_Timing_Recovery.
|
||||
% Target: C:/Users/Silas/Documents/MATLAB/imdd_simulation/Classes/04_DSP/Timing Recovery/MaxVar_Timing_Recovery.m
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for MaxVar_Timing_Recovery
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
methods (Test, TestTags = {'placeholder', 'todo'})
|
||||
function testNotImplemented(testCase)
|
||||
testCase.assumeFail("Tests for MaxVar_Timing_Recovery are not implemented yet.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
classdef T_04_DSP_Timing_Recovery_Timing_Recovery_test < IMDDTestCase
|
||||
methods (Test, TestTags = {'unit', 'fast', 'dsp', 'timing-recovery'})
|
||||
function constructorAppliesDefaultConfiguration(testCase)
|
||||
tr = Timing_Recovery();
|
||||
|
||||
testCase.verifyEqual(tr.modulation, 'PAM/PSK/QAM');
|
||||
testCase.verifyEqual(tr.timing_error_detector, 'Gardner');
|
||||
testCase.verifyEqual(tr.sps, 2);
|
||||
testCase.verifyEqual(tr.damping_factor, 1.0);
|
||||
testCase.verifyEqual(tr.normalized_loop_bandwidth, 0.005);
|
||||
testCase.verifyEqual(tr.detector_gain, 1);
|
||||
end
|
||||
|
||||
function constructorStoresConfiguredProperties(testCase)
|
||||
tr = Timing_Recovery( ...
|
||||
"modulation", 'PAM/PSK/QAM', ...
|
||||
"timing_error_detector", 'Gardner', ...
|
||||
"sps", 4, ...
|
||||
"damping_factor", 0.75, ...
|
||||
"normalized_loop_bandwidth", 0.02, ...
|
||||
"detector_gain", 1.5);
|
||||
|
||||
testCase.verifyEqual(tr.modulation, 'PAM/PSK/QAM');
|
||||
testCase.verifyEqual(tr.timing_error_detector, 'Gardner');
|
||||
testCase.verifyEqual(tr.sps, 4);
|
||||
testCase.verifyEqual(tr.damping_factor, 0.75);
|
||||
testCase.verifyEqual(tr.normalized_loop_bandwidth, 0.02);
|
||||
testCase.verifyEqual(tr.detector_gain, 1.5);
|
||||
end
|
||||
|
||||
function processSignalsMissingCommunicationsToolboxClearly(testCase)
|
||||
tr = Timing_Recovery("sps", 2);
|
||||
inputSignal = Informationsignal([1; -1; 1; -1], "fs", 2);
|
||||
|
||||
testCase.verifyError(@() tr.process(inputSignal), 'MATLAB:undefinedVarOrClass');
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,11 +1,10 @@
|
||||
classdef Time_Shifter_test < matlab.unittest.TestCase
|
||||
% Test class for Time_Shifter
|
||||
classdef Time_Shifter_test < IMDDTestCase
|
||||
% Auto-generated placeholder for Time_Shifter.
|
||||
% Target: C:/Users/Silas/Documents/MATLAB/imdd_simulation/Classes/04_DSP/Timing Recovery/Time_Shifter.m
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for Time_Shifter
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
methods (Test, TestTags = {'placeholder', 'todo'})
|
||||
function testNotImplemented(testCase)
|
||||
testCase.assumeFail("Tests for Time_Shifter are not implemented yet.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
classdef Timing_Recovery_GPT_test < matlab.unittest.TestCase
|
||||
% Test class for Timing_Recovery_GPT
|
||||
classdef Timing_Recovery_GPT_test < IMDDTestCase
|
||||
% Auto-generated placeholder for Timing_Recovery_GPT.
|
||||
% Target: C:/Users/Silas/Documents/MATLAB/imdd_simulation/Classes/04_DSP/Timing Recovery/Timing_Recovery_GPT.m
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for Timing_Recovery_GPT
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
methods (Test, TestTags = {'placeholder', 'todo'})
|
||||
function testNotImplemented(testCase)
|
||||
testCase.assumeFail("Tests for Timing_Recovery_GPT are not implemented yet.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
classdef Timing_Recovery_Move_It_test < matlab.unittest.TestCase
|
||||
% Test class for Timing_Recovery_Move_It
|
||||
classdef Timing_Recovery_Move_It_test < IMDDTestCase
|
||||
% Auto-generated placeholder for Timing_Recovery_Move_It.
|
||||
% Target: C:/Users/Silas/Documents/MATLAB/imdd_simulation/Classes/04_DSP/Timing Recovery/Timing_Recovery_Move_It.m
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for Timing_Recovery_Move_It
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
methods (Test, TestTags = {'placeholder', 'todo'})
|
||||
function testNotImplemented(testCase)
|
||||
testCase.assumeFail("Tests for Timing_Recovery_Move_It are not implemented yet.");
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
classdef Timing_Recovery_test < matlab.unittest.TestCase
|
||||
% Test class for Timing_Recovery
|
||||
|
||||
methods (Test)
|
||||
function testExample(testCase)
|
||||
% Example test case for Timing_Recovery
|
||||
% Add your test code here
|
||||
testCase.verifyTrue(true);
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user