File: math-test.adb

package info (click to toggle)
libaunit 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,360 kB
  • sloc: ada: 5,615; python: 243; makefile: 223; sh: 92; xml: 13
file content (23 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--
--  Copyright (C) 2008, AdaCore
--
with AUnit.Assertions; use AUnit.Assertions;

package body Math.Test is

   function Name (T : Test) return AUnit.Message_String is
      pragma Unreferenced (T);
   begin
      return AUnit.Format ("Test Math package");
   end Name;

   procedure Run_Test (T : in out Test) is
      pragma Unreferenced (T);
      I1 : constant Int := 5;
      I2 : constant Int := 3;
   begin
      Assert (I1 + I2 = 8, "Incorrect result after addition");
      Assert (I1 - I2 = 2, "Incorrect result after subtraction");
   end Run_Test;

end Math.Test;