Skip to content
Snippets Groups Projects
Commit 504ecec2 authored by Ngoc Minh Trang Vu's avatar Ngoc Minh Trang Vu Committed by Federico Felici
Browse files

update test SCDsignal with new restriction

parent ab1186d1
No related branches found
No related tags found
No related merge requests found
classdef SCDsignal_test < matlab.unittest.TestCase classdef SCDsignal_test < matlab.unittest.TestCase
properties (MethodSetupParameter) properties (MethodSetupParameter)
type = {'single','double','logical','double'}; type = {'int8','single','int32','single'};
m = {1, 100, 3, 3 }; m = {1, 100, 3, 3 };
n = {1, 1, 3, 10 }; n = {1, 1, 3, 10 };
end end
...@@ -134,10 +134,10 @@ classdef SCDsignal_test < matlab.unittest.TestCase ...@@ -134,10 +134,10 @@ classdef SCDsignal_test < matlab.unittest.TestCase
end end
function test_struct_to_bus(testCase) function test_struct_to_bus(testCase)
% Test creation of complex bus from structure which may contain %% Test creation of complex bus from structure which may contain
% SCDsignals at leaves % SCDsignals at leaves
S_sub = struct('sig1',{testCase.sig},'sig2',rand(5,5)); S_sub = struct('sig1',{testCase.sig},'sig2',single(rand(5,5)));
S = struct('a',1,'b',ones(3,1),'c',true(4,2),'sub',S_sub,'sig',{SCDsignal(ones(4,1))}); S = struct('a',single(1),'b',single(ones(3,1)),'c',true(4,2),'sub',S_sub,'sig',{SCDsignal(single(ones(4,1)))});
testCase.verifyWarningFree(@() SCDsignal_struct_to_bus(S,'myTestBus','Bus with several data types for testing')); testCase.verifyWarningFree(@() SCDsignal_struct_to_bus(S,'myTestBus','Bus with several data types for testing'));
end end
end end
......
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