Skip to content

Commit a9c6902

Browse files
Updated test to verify the bus element color.
1 parent f27d477 commit a9c6902

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Test/Script/TractorEnergyComputationScriptTest.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ function testBusElementLabelColor(testCase)
5858

5959
% Verify initial condition
6060
busElement7 = 'TractorEnergyComputation/Tractor/Tractor Body and Powertrain/Hydrostatic CVT/Bus Element Out7';
61-
testCase.verifyNotEqual(get_param(busElement7, 'ForegroundColor'), 'black',...
62-
'The initial ''ForegroundColor'' for busElement7 should not be ''black''.');
61+
testCase.verifyNotEqual(get_param(busElement7, 'ForegroundColor'), '[0.1, 0.2, 0.3]',...
62+
'The initial ''ForegroundColor'' for busElement7 should not be as expected.');
6363

6464
% Evaluate function
6565
open_system("TractorEnergyComputation/Tractor/Tractor Body and Powertrain/Hydrostatic CVT")
6666
busElementLabelColor('[0.1, 0.2, 0.3]', 1);
6767

6868
% Verify bus element color is 'black'
69-
testCase.verifyEqual(get_param(busElement7, 'ForegroundColor'), '[0.1, 0.2, 0.3]',...
70-
'The ''ForegroundColor'' for busElement7 should be ''black''.');
69+
testCase.verifyEqual(str2num(get_param(busElement7, 'ForegroundColor')), [0.1, 0.2, 0.3],...
70+
'The ''ForegroundColor'' for busElement7 should be ''[0.1, 0.2, 0.3]''.');
7171
end
7272

7373
function testPlotEnergySankey(testCase)

0 commit comments

Comments
 (0)