Commit 203cd372 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update test-iterators

parent 5a6ba38e
-- This file was generated automatically by TASTE: DO NOT EDIT
package body ASN1_Iterators.iterators is
-- ASN.1 File dataview-uniq.asn
-- Module TASTE_BasicTypes
package body T_Int_pkg is
procedure To_ASN1(from: Interfaces.Integer_64; to: out ASN1_Type) is
begin
to := from;
end;
end;
package body T_SeqOf_pkg is
procedure To_ASN1(from: Inner.MySeqOf; to: out ASN1_Type) is
begin
for idx in 1..from.length loop
to.data(idx) := from.data(idx);
end loop;
to.length := from.length;
end;
end;
end;
-- This file was generated automatically by TASTE: DO NOT EDIT
-- Generic constructs for common/basic types
with generic_integer;
with generic_seqof;
with asn1_iterators;
pragma Unreferenced (asn1_iterators);
with Interfaces;
use Interfaces;
package ASN1_Iterators.iterators is
-- ASN.1 File dataview-uniq.asn
-- Module TASTE_BasicTypes
-- List of exported types: "T-Int", "T-SeqOf"
-- Imported modules:
-- End imported modules --
-- Type "T-Int defined at line 4
package T_Int_pkg is
subtype ASN1_Type is asn1SccT_Int;
package Inner is new Generic_Integer (Min => 0, Max => 4);
package It renames Inner.It;
procedure To_ASN1(from: Interfaces.Integer_64; to: out ASN1_Type);
subtype Instance is Inner.Instance;
end;
-- Type "T-SeqOf defined at line 6
package T_SeqOf_pkg is
subtype ASN1_Type is asn1SccT_SeqOf;
package Inner is new Generic_SeqOf (Min => 1, Max => 4, Basic => T_Int_Pkg.It);
procedure To_ASN1 (from: Inner.MySeqOf; to: out ASN1_Type);
subtype Instance is Inner.Instance;
end;
end;
-- This file was generated automatically by TASTE: DO NOT EDIT
-- Generic constructs for common/basic types
with generic_integer;
with generic_seqof;
-- Dummy package that is used to "with" the ASN.1 modules
-- ASN.1 File dataview-uniq.asn
with TASTE_BasicTypes;
use TASTE_BasicTypes;
pragma Unreferenced(TASTE_BasicTypes);
package ASN1_Iterators is
-- ASN.1 File /home/mperroti/taste/opengeode/tests/regression/test-iterators/dataview-uniq.asn
-- Module name: TASTE-BasicTypes
-- List of exported types: "T-Int", "T-SeqOf"
-- Imported modules --
-- End imported modules --
-- Type "T-Int defined at line 4
package T_Int_pkg is new Generic_Integer (Min => 0, Max => 4);
-- Type "T-SeqOf defined at line 6
package T_SeqOf_pkg is new Generic_SeqOf (Min => 1, Max => 4, Basic => T_Int_Pkg.It);
end;
\ No newline at end of file
with orchestrator;
use orchestrator;
with orchestrator_stop_conditions;
with asn1_iterators;
use asn1_iterators;
with asn1_iterators.iterators;
use asn1_iterators.iterators;
with TASTE_BasicTypes;
use TASTE_BasicTypes;
......@@ -16,7 +16,6 @@ with ada.Unchecked_Conversion;
with system;
with ada.strings.hash;
with Ada.containers.hashed_sets;
with Ada.containers.ordered_maps;
with Ada.containers.vectors;
use Ada.containers;
......@@ -31,16 +30,6 @@ procedure test is
-- To save/restore the context when calling a PI:
backup_ctxt : Context_ty;
procedure save_context is
begin
backup_ctxt := Process_Ctxt;
end;
procedure restore_context is
begin
Process_Ctxt := backup_ctxt;
end;
-- Type representing an event (input or output)
type Interfaces is (start, pulse_pi, arr_pi, paramless_pi);
type Event_ty (Option: Interfaces) is
......@@ -110,7 +99,6 @@ procedure test is
use Lists;
queue : Lists.Vector;
qcursor : Lists.Cursor := queue.First;
visited : Lists.Vector;
-- Check all properties in one go, and if one fails, set errno
......@@ -153,14 +141,14 @@ procedure test is
event : Event_ty (pulse_pi);
S_Hash : Hash_Type;
begin
save_context;
backup_ctxt := Process_Ctxt;
for each of pulse_it loop
event.pulse_param := each;
T_Int_Pkg.To_asn1(each, event.pulse_param);
orchestrator.pulse(event.pulse_param'access);
count := count + 1;
S_Hash := Add_to_graph(event => event);
check_and_report(S_Hash);
restore_context;
Process_Ctxt := backup_ctxt;
end loop;
end;
......@@ -169,17 +157,14 @@ procedure test is
event : Event_ty (arr_pi);
S_Hash : Hash_Type;
begin
save_context;
backup_ctxt := Process_Ctxt;
for each of arr_it loop
event.arr_param.length := each.length; -- only variable-sized arrays
for idx in 1..each.length loop
event.arr_param.data(idx) := each.data(idx);
end loop;
T_SeqOf_pkg.To_asn1(each, event.arr_param);
orchestrator.arr(event.arr_param'access);
count := count + 1;
S_Hash := Add_to_graph(event => event);
check_and_report(S_Hash);
restore_context;
Process_Ctxt := backup_ctxt;
end loop;
end;
......@@ -187,12 +172,12 @@ procedure test is
event : Event_ty (paramless_pi);
S_Hash : Hash_Type;
begin
save_context;
backup_ctxt := Process_Ctxt;
orchestrator.paramless;
count := count + 1;
S_Hash := Add_to_graph(event => event);
check_and_report(S_Hash);
restore_context;
Process_Ctxt := backup_ctxt;
end;
procedure exhaustive_simulation is
......
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