-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update everything impacted by the removal of WLTP simulation case. Ma…
…ke all tests pass.
- Loading branch information
1 parent
004850e
commit a69bbe1
Showing
304 changed files
with
4,580 additions
and
4,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,119 @@ | ||
classdef BEV_UnitTest_MQC < BEVTestCase | ||
%% Class implementation of unit test | ||
% | ||
% These are tests to achieve the Minimum Quality Criteria (MQC). | ||
% MQC is achieved when all runnables (models, scripts, functions) run | ||
% without any errors. | ||
% | ||
% You can run this test by opening in MATLAB Editor and clicking | ||
% Run Tests button or Run Current Test button. | ||
% You can also run this test using test runner (the *_runtests.m script) | ||
% which can not only run tests but also generates test summary and | ||
% a code coverage report. | ||
|
||
% Copyright 2022-2023 The MathWorks, Inc. | ||
%% Class implementation of unit test | ||
% | ||
% These are tests to achieve the Minimum Quality Criteria (MQC). | ||
% MQC is achieved when all runnables (models, scripts, functions) run | ||
% without any errors. | ||
% | ||
% You can run this test by opening in MATLAB Editor and clicking | ||
% Run Tests button or Run Current Test button. | ||
% You can also run this test using test runner (the *_runtests.m script) | ||
% which can not only run tests but also generates test summary and | ||
% a code coverage report. | ||
|
||
% Copyright 2022-2024 The MathWorks, Inc. | ||
|
||
methods (Test) | ||
|
||
%% Top folder | ||
|
||
function MQC_TopFolder_1(~) | ||
BEV_main_script | ||
end | ||
|
||
function MQC_TopFolder_2(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
BEV_setup | ||
end | ||
|
||
function MQC_TopFolder_3(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
sim(mdl); | ||
end | ||
|
||
%% SimlationCases folder | ||
|
||
function MQC_SimulationCases_1_1(~) | ||
BEV_Case_Constant_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_2(~) | ||
BEV_Case_FTP75_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_3(~) | ||
BEV_Case_HighSpeed_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_4(~) | ||
BEV_Case_SimpleDrivePattern_Basic | ||
end | ||
|
||
function MQC_SimulationCases_2_1(~) | ||
BEV_Case_Constant_Thermal | ||
end | ||
|
||
function MQC_SimulationCases_2_2(~) | ||
BEV_Case_SimpleDrivePattern_Thermal | ||
end | ||
|
||
%% Utility > Configuration folder | ||
|
||
function MQC_Configuration_1(~) | ||
load_system("BEV_system_model") | ||
BEV_useComponents_Basic | ||
end | ||
|
||
function MQC_Configuration_2(~) | ||
load_system("BEV_system_model") | ||
BEV_useComponents_Thermal | ||
end | ||
|
||
%% Utility folder | ||
|
||
function MQC_Utility_1(~) | ||
BEV_getMotorSpeedFromVehicleSpeed | ||
end | ||
|
||
function MQC_Utility_2(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
simOut = sim(mdl); | ||
simData = extractTimetable(simOut.logsout); | ||
% Test target | ||
BEV_plotResultsCompact(SimData = simData); | ||
end | ||
|
||
end % methods (Test) | ||
|
||
%% Test callback buttons | ||
|
||
properties | ||
FilesAndFolders {mustBeText} = "" | ||
end | ||
|
||
methods (TestClassSetup) | ||
|
||
function buildFilesFoldersList(testCase) | ||
%% | ||
projectFiles = [currentProject().Files.Path]'; | ||
% logical index | ||
lix = not(contains(projectFiles, [".git", "resources", "simcache"])); | ||
testCase.FilesAndFolders = projectFiles(lix); | ||
end % function | ||
|
||
methods (Test) | ||
|
||
%% Top folder | ||
|
||
function MQC_TopFolder_1(~) | ||
BEV_main_script | ||
end | ||
|
||
function MQC_TopFolder_2(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
BEV_setup | ||
end | ||
|
||
function MQC_TopFolder_3(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
sim(mdl); | ||
end | ||
|
||
%% SimlationCases folder | ||
|
||
function MQC_SimulationCases_1_1(~) | ||
BEV_Case_Constant_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_2(~) | ||
BEV_Case_FTP75_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_3(~) | ||
BEV_Case_HighSpeed_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_4(~) | ||
BEV_Case_SimpleDrivePattern_Basic | ||
end | ||
|
||
function MQC_SimulationCases_1_5(~) | ||
BEV_Case_WLTP_Basic | ||
end | ||
|
||
function MQC_SimulationCases_2_1(~) | ||
BEV_Case_Constant_Thermal | ||
end | ||
|
||
function MQC_SimulationCases_2_2(~) | ||
BEV_Case_SimpleDrivePattern_Thermal | ||
end | ||
|
||
%% Utility > Configuration folder | ||
|
||
function MQC_Configuration_1(~) | ||
load_system("BEV_system_model") | ||
BEV_useComponents_Basic | ||
end | ||
|
||
function MQC_Configuration_2(~) | ||
load_system("BEV_system_model") | ||
BEV_useComponents_Thermal | ||
end | ||
|
||
%% Utility folder | ||
|
||
function MQC_Utility_1(~) | ||
BEV_getMotorSpeedFromVehicleSpeed | ||
end | ||
|
||
function MQC_Utility_2(~) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
simOut = sim(mdl); | ||
simData = extractTimetable(simOut.logsout); | ||
% Test target | ||
BEV_plotResultsCompact(SimData = simData); | ||
end | ||
|
||
end % methods (Test) | ||
|
||
%% Test callback buttons | ||
|
||
properties | ||
FilesAndFolders {mustBeText} = "" | ||
end | ||
|
||
methods (TestClassSetup) | ||
|
||
function buildFilesFoldersList(testCase) | ||
%% | ||
projectFiles = [currentProject().Files.Path]'; | ||
% logical index | ||
lix = not(contains(projectFiles, [".git", "resources", "simcache"])); | ||
testCase.FilesAndFolders = projectFiles(lix); | ||
end % function | ||
end % methods | ||
|
||
end % methods | ||
methods (Test) | ||
|
||
methods (Test) | ||
function MQC_CallbackButtons_1(testCase) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
checkCallbackButton(mdl, testCase.FilesAndFolders) | ||
end | ||
|
||
function MQC_CallbackButtons_1(testCase) | ||
mdl = "BEV_system_model"; | ||
load_system(mdl) | ||
checkCallbackButton(mdl, testCase.FilesAndFolders) | ||
end | ||
|
||
end % methods | ||
end % methods | ||
|
||
end % classdef |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-155 KB
Components/ControllerAndEnvironment/SimulationCases/CtrlEnv_Case_WLTP.mlx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
Components/ControllerAndEnvironment/Utility/Configuration/CtrlEnv_loadCase_WLTP.m
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.