LEFT | RIGHT |
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) 2009 CTTC | 3 * Copyright (c) 2009 CTTC |
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 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // the above will return and after RetrieveTestResults have | 118 // the above will return and after RetrieveTestResults have |
119 // been called and after all signals have expired | 119 // been called and after all signals have expired |
120 Simulator::Destroy (); | 120 Simulator::Destroy (); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 | 124 |
125 void | 125 void |
126 SpectrumInterferenceTestCase::RetrieveTestResult (SpectrumInterference* si) | 126 SpectrumInterferenceTestCase::RetrieveTestResult (SpectrumInterference* si) |
127 { | 127 { |
128 NS_TEST_ASSERT_MSG_EQ ((uint32_t)si->EndRx (), m_rxCorrectKnownOutcome, "no me
ssage"); | 128 NS_TEST_ASSERT_MSG_EQ (static_cast<uint32_t> (si->EndRx ()), m_rxCorrectKnownO
utcome, "no message"); |
129 } | 129 } |
130 | 130 |
131 | 131 |
132 | 132 |
133 class SpectrumInterferenceTestSuite : public TestSuite | 133 class SpectrumInterferenceTestSuite : public TestSuite |
134 { | 134 { |
135 public: | 135 public: |
136 SpectrumInterferenceTestSuite (); | 136 SpectrumInterferenceTestSuite (); |
137 }; | 137 }; |
138 | 138 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 AddTestCase (new SpectrumInterferenceTestCase (s2, 1, true, "sdBm
= [-63 -61] tx bytes: 1"), TestCase::QUICK); | 185 AddTestCase (new SpectrumInterferenceTestCase (s2, 1, true, "sdBm
= [-63 -61] tx bytes: 1"), TestCase::QUICK); |
186 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
0.5 + 0.5), true, "sdBm = [-63 -61] tx bytes: b*0.5"), TestCase::QUICK); | 186 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
0.5 + 0.5), true, "sdBm = [-63 -61] tx bytes: b*0.5"), TestCase::QUICK); |
187 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
(1 - e) + 0.5), true, "sdBm = [-63 -61] tx bytes: b*(1-e)"), TestCase::QUICK); | 187 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
(1 - e) + 0.5), true, "sdBm = [-63 -61] tx bytes: b*(1-e)"), TestCase::QUICK); |
188 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
(1 + e) + 0.5), false, "sdBm = [-63 -61] tx bytes: b*(1+e)"), TestCase::QUICK)
; | 188 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
(1 + e) + 0.5), false, "sdBm = [-63 -61] tx bytes: b*(1+e)"), TestCase::QUICK)
; |
189 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
1.5 + 0.5), false, "sdBm = [-63 -61] tx bytes: b*1.5"), TestCase::QUICK); | 189 AddTestCase (new SpectrumInterferenceTestCase (s2, static_cast<uint32_t> (b *
1.5 + 0.5), false, "sdBm = [-63 -61] tx bytes: b*1.5"), TestCase::QUICK); |
190 AddTestCase (new SpectrumInterferenceTestCase (s2, 0xffffffff, false, "sdB
m = [-63 -61] tx bytes: 2^32-1"), TestCase::QUICK); | 190 AddTestCase (new SpectrumInterferenceTestCase (s2, 0xffffffff, false, "sdB
m = [-63 -61] tx bytes: 2^32-1"), TestCase::QUICK); |
191 | 191 |
192 } | 192 } |
193 | 193 |
194 static SpectrumInterferenceTestSuite spectrumInterferenceTestSuite; | 194 static SpectrumInterferenceTestSuite spectrumInterferenceTestSuite; |
LEFT | RIGHT |