Select Git revision
test_gps_randomized_cycling.m 741 B
% test case for function gps_randomized_cycling
%purpose: verify that the transition turn_on is taken from initial state
%oracle: the transition brings in the state cold_start
clear all %clear workspace
close all
cd .. %move to functions directory
%initialize input data
sensor.state='no_info';
sensor.fetchfp=1.0;
sensor.geteph=Inf;
sensor.ephExp=1800.0;
sensor.fp=0;
sensor.eph=5;
turn=true;
time=0;
sv=5;
%execute function
sensor=gps_randomized_cycling(time,sensor,turn,sv);
cd tests %go back to tests directory
%verify output
if ~(strcmp(sensor.state,'cold_start'))
error('error in function gps_randomized_cycling')
else
disp('function gps_randomized_ccycling ok')
end