Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martina Maggio
gps-modeling
Commits
3a311c03
Commit
3a311c03
authored
Feb 27, 2019
by
Claudio Mandrioli
Browse files
added test case for function get_settings_car
parent
339222a3
Changes
1
Show whitespace changes
Inline
Side-by-side
matlab/tests/test_get_settings_car.m
0 → 100644
View file @
3a311c03
% 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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment