Skip to content

Commit

Permalink
test: add additional diagnostics to tIMAPAnalysis
Browse files Browse the repository at this point in the history
  • Loading branch information
mfacchinelli committed Jan 14, 2025
1 parent d7a4383 commit e3a6f02
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion tests/system/analyze/tIMAPAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,31 @@ function fullAnalysis(testCase)
testCase.verifySubstring(analysis.HKFileNames{5}, "idle_export_stat.MAG_HSK_STATUS_20240507_111151.csv", "HK file names do not match.");

testCase.assertNotEmpty(analysis.Results, "Results should not be empty.");
testCase.verifyEqualsBaseline(analysis.Results, matlabtest.baselines.MATFileBaseline("results.mat", VariableName = "results"));

matBaseline = matlabtest.baselines.MATFileBaseline("results.mat", VariableName = "results");
testCase.verifyEqualsBaseline(analysis.Results, matBaseline, @() testCase.findDifference(analysis.Results, matBaseline.load()));
end
end

methods (Access = private)

function findDifference(testCase, expected, actual)

md = metaclass(expected);

for mp = md.PropertyList'

if isequal(mp.GetAccess, "public")

if ~isequal(expected.(mp.Name), actual.(mp.Name))

testCase.log(compose("Property ""%s"" is different.", mp.Name));

disp(expected.(mp.Name));
disp(actual.(mp.Name));
end
end
end
end
end
end

0 comments on commit e3a6f02

Please sign in to comment.