Skip to content

Commit

Permalink
Minor updates to test.ads and test.gpr to enable checking of precondi…
Browse files Browse the repository at this point in the history
…tions.
  • Loading branch information
BrentSeidel committed May 15, 2024
1 parent b508a2a commit 9b011b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions test/test.adb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ procedure test is
tsys : ode.params(1..2);
ysys : ode.params(1..2);
rsys : ode.params(1..2);
-- func : constant func_array := (f1sys'Access, f2sys'Access);
func : constant ode.functs(1 .. 2) := (f1sys'Access, f2sys'Access);
begin
Ada.Text_IO.Put_Line("Testing some of the numerical routines.");
res := linreg.simple_linear(data);
Expand Down Expand Up @@ -159,8 +159,7 @@ begin
float_io.Put(ysys(2), 2, 6, 0);
Ada.Text_IO.New_Line;
for i in 1 .. 10 loop
rsys := ode.rk4s((1 => f1sys'Access, 2 => f2sys'Access),
tsys, ysys, step);
rsys := ode.rk4s(func, tsys, ysys, step);
ysys := rsys;
t := real(i)*step;
Ada.Text_IO.Put(" ");
Expand Down
5 changes: 4 additions & 1 deletion test/test.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ project test is
for Object_Dir use "../obj";
for Main use ("test.adb");
for Exec_Dir use ".";
package builder is
for switches ("Ada") use ("-s");
end builder;
package compiler is
for switches ("Ada") use ("-g", "-gnateE");
for switches ("Ada") use ("-g", "-gnateE", "-gnata");
end compiler;
end test;

0 comments on commit 9b011b5

Please sign in to comment.