-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_bscu.adb
More file actions
40 lines (35 loc) · 949 Bytes
/
test_bscu.adb
File metadata and controls
40 lines (35 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- Author: A. Ireland
--
-- Address: School Mathematical & Computer Sciences
-- Heriot-Watt University
-- Edinburgh, EH14 4AS
--
-- E-mail: a.ireland@hw.ac.uk
--
-- Last modified: 10.9.2022
--
-- Filename: test_bscu.adb
--
-- Description: Test harness for the BSCU. Note that test data and results
-- are managed via the Env and Log packages respectively.
pragma SPARK_Mode (Off);
with Env, Log, BSCU, Sensors, Brakes;
use type Sensors.Sensor_Type;
procedure Test_BSCU is
begin
Env.Open_File;
Log.Open_File;
loop
exit when Env.At_End;
Env.Update;
Log.Update;
bscu.Control_Unit;
if (Sensors.Read_Sensor_Majority = Sensors.Enable) and not(Brakes.Enabled) then
Log.Crash;
exit;
end if;
Log.Update;
end loop;
Env.Close_File;
Log.Close_File;
end Test_BSCU;