Commit 3a311c03 authored by Claudio Mandrioli's avatar Claudio Mandrioli
Browse files

added test case for function get_settings_car

parent 339222a3
% 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment