OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 */ | 19 */ |
20 #include "ns3/global-value.h" | 20 #include "ns3/global-value.h" |
21 #include "ns3/test.h" | 21 #include "ns3/test.h" |
22 #include "ns3/uinteger.h" | 22 #include "ns3/uinteger.h" |
23 | 23 |
24 using namespace ns3; | 24 using namespace ns3; |
25 | 25 |
26 // =========================================================================== | 26 /** |
27 // Test for the ability to get at a GlobalValue. | 27 * \ingroup core-test |
28 // =========================================================================== | 28 * \ingroup tests |
| 29 * |
| 30 * \brief Test for the ability to get at a GlobalValue. |
| 31 */ |
29 class GlobalValueTestCase : public TestCase | 32 class GlobalValueTestCase : public TestCase |
30 { | 33 { |
31 public: | 34 public: |
32 GlobalValueTestCase (); | 35 GlobalValueTestCase (); |
33 virtual ~GlobalValueTestCase () {} | 36 virtual ~GlobalValueTestCase () {} |
34 | 37 |
35 private: | 38 private: |
36 virtual void DoRun (void); | 39 virtual void DoRun (void); |
37 }; | 40 }; |
38 | 41 |
(...skipping 27 matching lines...) Expand all Loading... |
66 for (GlobalValue::Vector::iterator i = vector->begin (); i != vector->end ();
++i) | 69 for (GlobalValue::Vector::iterator i = vector->begin (); i != vector->end ();
++i) |
67 { | 70 { |
68 if ((*i) == &uint) | 71 if ((*i) == &uint) |
69 { | 72 { |
70 vector->erase (i); | 73 vector->erase (i); |
71 break; | 74 break; |
72 } | 75 } |
73 } | 76 } |
74 } | 77 } |
75 | 78 |
76 // =========================================================================== | 79 /** |
77 // The Test Suite that glues all of the Test Cases together. | 80 * \ingroup core-test |
78 // =========================================================================== | 81 * \ingroup tests |
| 82 * |
| 83 * \brief The Test Suite that glues all of the Test Cases together. |
| 84 */ |
79 class GlobalValueTestSuite : public TestSuite | 85 class GlobalValueTestSuite : public TestSuite |
80 { | 86 { |
81 public: | 87 public: |
82 GlobalValueTestSuite (); | 88 GlobalValueTestSuite (); |
83 }; | 89 }; |
84 | 90 |
85 GlobalValueTestSuite::GlobalValueTestSuite () | 91 GlobalValueTestSuite::GlobalValueTestSuite () |
86 : TestSuite ("global-value", UNIT) | 92 : TestSuite ("global-value", UNIT) |
87 { | 93 { |
88 AddTestCase (new GlobalValueTestCase, TestCase::QUICK); | 94 AddTestCase (new GlobalValueTestCase, TestCase::QUICK); |
89 } | 95 } |
90 | 96 |
91 static GlobalValueTestSuite globalValueTestSuite; | 97 static GlobalValueTestSuite globalValueTestSuite; |
OLD | NEW |