Skip to content
Snippets Groups Projects
Commit 3a311c03 authored by Claudio Mandrioli's avatar Claudio Mandrioli
Browse files

added test case for function get_settings_car

parent 339222a3
No related branches found
No related tags found
No related merge requests found
% test case for function get_settings_car
%purpose: checks that the get_settings_car function returns a struct with
%the right fields
%oracle: the fields of the returned struct are sigma_acc sigma_giro
%sigma_acc_bias sigma_giro_bias sigma_gps factp
clear all %clear workspace
close all
cd .. %move to functions directory
%execute function
settings=get_settings_car();
cd tests %go back to tests directory
%verify output
if ~(isfield(settings, 'sigma_acc') && ...
isfield(settings, 'sigma_gyro') && ...
isfield(settings, 'sigma_acc_bias') && ...
isfield(settings, 'sigma_gyro_bias') && ...
isfield(settings, 'sigma_gps') && ...
isfield(settings, 'factp'))
error('error in function get_settings_car')
else
disp('function get_settings_car ok')
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment