diff --git a/matlab/tests/test_get_settings_car.m b/matlab/tests/test_get_settings_car.m new file mode 100644 index 0000000000000000000000000000000000000000..e7fa129a09c48b77d25daa728d265c303209ee17 --- /dev/null +++ b/matlab/tests/test_get_settings_car.m @@ -0,0 +1,28 @@ +% 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