DB and 400G and minor changes
This commit is contained in:
50
Tests/Testclass_template.m
Normal file
50
Tests/Testclass_template.m
Normal file
@@ -0,0 +1,50 @@
|
||||
classdef Testclass_template < matlab.unittest.TestCase
|
||||
|
||||
properties
|
||||
%genereal properties of the test
|
||||
end
|
||||
|
||||
properties (MethodSetupParameter)
|
||||
% Define method-level parameters for PRBS and bit pattern
|
||||
% i.e.: useprbs = {0,1};
|
||||
useprbs = {0,1};
|
||||
M = {2,4,6};
|
||||
end
|
||||
|
||||
properties (TestParameter)
|
||||
% Define test-level parameters for M and O
|
||||
|
||||
end
|
||||
|
||||
methods (TestMethodSetup)
|
||||
|
||||
function setupTest(testCase, useprbs, M)
|
||||
% Setup everything that is somehow reguired for the test,
|
||||
% include the MethodSetupParameters here as arguments
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
methods (Test)
|
||||
% Test with sequential combination of parameters
|
||||
function myTest(testCase, M, useprbs)
|
||||
% Write the actual test,
|
||||
% include the MethodSetupParameters here as arguments
|
||||
|
||||
% Assert that BER is zero
|
||||
testCase.verifyEqual(M, M, 'error message');
|
||||
testCase.verifyEqual(useprbs, useprbs, 'error message');
|
||||
end
|
||||
|
||||
% Test with sequential combination of parameters
|
||||
function anotherTest(testCase, M)
|
||||
% Write the actual test,
|
||||
% include the MethodSetupParameters here as arguments
|
||||
|
||||
% Assert that BER is zero
|
||||
testCase.verifyEqual(M, M, 'error message');
|
||||
testCase.verifyClass(M,'double');
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user