~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to tests/CLASSIX/CLASSIX_Group_Test.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- C++ -*- */
2
 
// CLASSIX_Group_Test.cpp,v 1.1 1998/06/24 10:37:45 wchiang Exp
3
 
 
4
 
// ============================================================================
5
 
//
6
 
// = LIBRARY
7
 
//    tests
8
 
// 
9
 
// = FILENAME
10
 
//    Group_Test.cpp
11
 
//
12
 
// = DESCRIPTION
13
 
//     This is a test of the <IPP_CLASSIX_Group_*> class.
14
 
//
15
 
// = AUTHOR
16
 
//    Wei Chiang
17
 
// 
18
 
// ============================================================================
19
 
 
20
 
#include "ace/CLASSIX/CLASSIX_Addr.h"
21
 
#include "ace/CLASSIX/CLASSIX_Group_Stamp.h"
22
 
#include "ace/CLASSIX/CLASSIX_Group_Dynamic.h"
23
 
 
24
 
#include "tests/test_config.h"
25
 
 
26
 
int
27
 
main (int, char *[])
28
 
{
29
 
  ACE_START_TEST ("Group_Test");
30
 
 
31
 
  int stamp = 20;
32
 
  /* ================================================================== */
33
 
  ACE_DEBUG((LM_INFO, "-----------group target-----------\n"));
34
 
 
35
 
  ACE_DEBUG((LM_INFO, "constrctor(Stamp)..................\n"));
36
 
  ACE_CLASSIX_Group_Stamp t0(100);
37
 
  t0.dump();
38
 
 
39
 
  /* ================================================================== */
40
 
  ACE_DEBUG((LM_INFO, "-----------group target-----------\n"));
41
 
 
42
 
  ACE_DEBUG((LM_INFO, "constrctor(Stamp)..................\n"));
43
 
  ACE_CLASSIX_Group_Stamp t1(stamp);
44
 
  t1.dump();
45
 
 
46
 
  /* ================================================================== */
47
 
  ACE_DEBUG((LM_INFO, "empty constrctor(Stamp) & set_group()\n"));
48
 
  ACE_CLASSIX_Group_Stamp t2;
49
 
  if (t2 == t1)
50
 
      ACE_DEBUG((LM_ERROR, "t2 == t1, should be !=\n"));
51
 
  t2.set_addr(&stamp);
52
 
  t2.dump();
53
 
  if (t2 != t1)
54
 
      ACE_DEBUG((LM_ERROR, "????t2 != t1, should be ==\n"));
55
 
      
56
 
 
57
 
  /* ================================================================== */
58
 
  ACE_DEBUG((LM_INFO, "Constrctor(Dynamic) & set_group()\n"));
59
 
  ACE_CLASSIX_Group_Dynamic t3;
60
 
  t3.dump();
61
 
 
62
 
  ACE_CLASSIX_Group_Stamp t4;
63
 
  t4.set_addr(t2.get_addr(), t2.get_size()); 
64
 
  t4.dump();
65
 
  if (t4 == t2)
66
 
      ACE_DEBUG((LM_ERROR, "????t4 == t2, should be !=\n"));
67
 
  t4.set_addr(&stamp); 
68
 
  t4.dump();
69
 
  if (t4 != t2)
70
 
      ACE_DEBUG((LM_ERROR, "????t4 != t2, should be ==\n"));
71
 
 
72
 
  ACE_CLASSIX_Group t5(t3.get_addr(), t3.get_size());
73
 
  t5.dump();
74
 
  if (t5 != t3)
75
 
      ACE_DEBUG((LM_ERROR, "????t5 != t3, should be ==\n"));
76
 
      
77
 
 
78
 
  if (t2 != t1)
79
 
      ACE_DEBUG((LM_ERROR, "????t2 != t1, should be ==\n"));
80
 
      
81
 
  /* ================================================================== */
82
 
  ACE_END_TEST;
83
 
  return 0;
84
 
}
85