File: shape-tests.adb

package info (click to toggle)
libaunit 18-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,100 kB
  • sloc: ada: 5,325; makefile: 152; sh: 94; xml: 13
file content (38 lines) | stat: -rw-r--r-- 979 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--
--  Copyright (C) 2008, AdaCore
--
with AUnit.Assertions; use AUnit.Assertions;

package body Shape.Tests is

   --------------------
   -- Test_Set_Width --
   --------------------

   procedure Test_Set_Width (T : in out Test) is
   begin
      T.The_Shape.Set_Width (3);
      Assert
        (T.The_Shape.Width = 3,
         "Width did not return the correct value after a Set_Width");

      T.The_Shape.Set_Width (7);
      Assert
        (T.The_Shape.Width = 7,
         "Width did not return the correct value after a 2nd Set_Width");
   end Test_Set_Width;

   procedure Test_Set_Height (T : in out Test) is
   begin
      T.The_Shape.Set_Height (3);
      Assert
        (T.The_Shape.Height = 3,
         "Height did not return the correct value after a Set_Height");

      T.The_Shape.Set_Height (7);
      Assert
        (T.The_Shape.Height = 7,
         "Height did not return the correct value after a 2nd Set_Height");
   end Test_Set_Height;

end Shape.Tests;