[Positioner] tests: AccessPoint -> CapturePoint
This commit is contained in:
parent
ecae205955
commit
4a534755db
|
@ -1,82 +0,0 @@
|
|||
#include <cxxtest/TestSuite.h>
|
||||
|
||||
#include "accesspoint.hh"
|
||||
|
||||
class AccessPoint_test: public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
void test_constructors(void)
|
||||
{
|
||||
// Default constructor
|
||||
AccessPoint accesspoint1 ;
|
||||
AccessPoint accesspoint2(Point3D(), "", "",
|
||||
AP_DEFAULT_ANTENNA_GAIN,
|
||||
WIFIDEVICE_DEFAULT_TRX_POWER,
|
||||
AP_DEFAULT_CHANNEL) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1, accesspoint2) ;
|
||||
|
||||
// Copy constructor
|
||||
AccessPoint accesspoint3(Point3D(4,3,5), "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 5, 32, 11) ;
|
||||
AccessPoint accesspoint4(accesspoint3) ;
|
||||
TS_ASSERT_EQUALS(accesspoint3, accesspoint4) ;
|
||||
}
|
||||
|
||||
|
||||
void test_accessors(void)
|
||||
{
|
||||
// Simple read accessors
|
||||
Point3D point3d1(78,23,4) ;
|
||||
AccessPoint accesspoint1(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_coordinates(), point3d1) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_ip_addr(), "192.168.0.1") ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_mac_addr(), "aa:bb:cc:dd:ee:ff") ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_antenna_gain(), 6) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_trx_power(), 38) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_frequency(),
|
||||
PosUtil::wifi_channel_to_hz(10)) ;
|
||||
|
||||
// Write & read accessors
|
||||
Point3D point3d2(78,23,4) ;
|
||||
accesspoint1.set_coordinates(point3d2) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_coordinates(), point3d2) ;
|
||||
accesspoint1.set_ip_addr("10.0.8.42") ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_ip_addr(), "10.0.8.42") ;
|
||||
accesspoint1.set_mac_addr("00:11:22:33:44:55") ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_mac_addr(), "00:11:22:33:44:55") ;
|
||||
accesspoint1.set_antenna_gain(12.4) ;
|
||||
TS_ASSERT_DELTA(accesspoint1.get_antenna_gain(), 12.4, 0.00001) ;
|
||||
accesspoint1.set_trx_power(22.7) ;
|
||||
TS_ASSERT_DELTA(accesspoint1.get_trx_power(), 22.7, 0.00001) ;
|
||||
accesspoint1.set_channel(13) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_frequency(),
|
||||
PosUtil::wifi_channel_to_hz(13)) ;
|
||||
accesspoint1.set_frequency(2423) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1.get_frequency(), 2423u) ;
|
||||
}
|
||||
|
||||
|
||||
void test_operators(void)
|
||||
{
|
||||
// ==
|
||||
Point3D point3d1(78,23,4) ;
|
||||
AccessPoint accesspoint1(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
AccessPoint accesspoint2(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT_EQUALS(accesspoint1, accesspoint2) ;
|
||||
|
||||
// !=
|
||||
Point3D point3d2(7,3,24) ;
|
||||
AccessPoint accesspoint3(point3d1, "10.0.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT(accesspoint2 != accesspoint3) ;
|
||||
|
||||
// =
|
||||
accesspoint2 = accesspoint3 ;
|
||||
TS_ASSERT_EQUALS(accesspoint2, accesspoint3) ;
|
||||
}
|
||||
|
||||
} ;
|
|
@ -0,0 +1,82 @@
|
|||
#include <cxxtest/TestSuite.h>
|
||||
|
||||
#include "capturepoint.hh"
|
||||
|
||||
class CapturePoint_test: public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
void test_constructors(void)
|
||||
{
|
||||
// Default constructor
|
||||
CapturePoint capturepoint1 ;
|
||||
CapturePoint capturepoint2(Point3D(), "", "",
|
||||
CP_DEFAULT_ANTENNA_GAIN,
|
||||
WIFIDEVICE_DEFAULT_TRX_POWER,
|
||||
CP_DEFAULT_CHANNEL) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1, capturepoint2) ;
|
||||
|
||||
// Copy constructor
|
||||
CapturePoint capturepoint3(Point3D(4,3,5), "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 5, 32, 11) ;
|
||||
CapturePoint capturepoint4(capturepoint3) ;
|
||||
TS_ASSERT_EQUALS(capturepoint3, capturepoint4) ;
|
||||
}
|
||||
|
||||
|
||||
void test_accessors(void)
|
||||
{
|
||||
// Simple read accessors
|
||||
Point3D point3d1(78,23,4) ;
|
||||
CapturePoint capturepoint1(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_coordinates(), point3d1) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_ip_addr(), "192.168.0.1") ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_mac_addr(), "aa:bb:cc:dd:ee:ff") ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_antenna_gain(), 6) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_trx_power(), 38) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_frequency(),
|
||||
PosUtil::wifi_channel_to_hz(10)) ;
|
||||
|
||||
// Write & read accessors
|
||||
Point3D point3d2(78,23,4) ;
|
||||
capturepoint1.set_coordinates(point3d2) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_coordinates(), point3d2) ;
|
||||
capturepoint1.set_ip_addr("10.0.8.42") ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_ip_addr(), "10.0.8.42") ;
|
||||
capturepoint1.set_mac_addr("00:11:22:33:44:55") ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_mac_addr(), "00:11:22:33:44:55") ;
|
||||
capturepoint1.set_antenna_gain(12.4) ;
|
||||
TS_ASSERT_DELTA(capturepoint1.get_antenna_gain(), 12.4, 0.00001) ;
|
||||
capturepoint1.set_trx_power(22.7) ;
|
||||
TS_ASSERT_DELTA(capturepoint1.get_trx_power(), 22.7, 0.00001) ;
|
||||
capturepoint1.set_channel(13) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_frequency(),
|
||||
PosUtil::wifi_channel_to_hz(13)) ;
|
||||
capturepoint1.set_frequency(2423) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1.get_frequency(), 2423u) ;
|
||||
}
|
||||
|
||||
|
||||
void test_operators(void)
|
||||
{
|
||||
// ==
|
||||
Point3D point3d1(78,23,4) ;
|
||||
CapturePoint capturepoint1(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
CapturePoint capturepoint2(point3d1, "192.168.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT_EQUALS(capturepoint1, capturepoint2) ;
|
||||
|
||||
// !=
|
||||
Point3D point3d2(7,3,24) ;
|
||||
CapturePoint capturepoint3(point3d1, "10.0.0.1",
|
||||
"aa:bb:cc:dd:ee:ff", 6, 38, 10) ;
|
||||
TS_ASSERT(capturepoint2 != capturepoint3) ;
|
||||
|
||||
// =
|
||||
capturepoint2 = capturepoint3 ;
|
||||
TS_ASSERT_EQUALS(capturepoint2, capturepoint3) ;
|
||||
}
|
||||
|
||||
} ;
|
|
@ -11,7 +11,7 @@ class InputCSV_test: public CxxTest::TestSuite
|
|||
{
|
||||
private:
|
||||
std::string csv_file_name ; // Test CSV file name
|
||||
std::vector<AccessPoint> aps ; // List of test AccessPoint
|
||||
std::vector<CapturePoint> aps ; // List of test CapturePoint
|
||||
|
||||
|
||||
public:
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
TS_ASSERT_EQUALS(request1.get_time_sent(),
|
||||
TestUtil::requests.at(0)->get_time_sent()) ;
|
||||
|
||||
for (std::vector<AccessPoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
for (std::vector<CapturePoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
i != TestUtil::aps.end() ; ++i)
|
||||
{
|
||||
std::unordered_map<std::string, Measurement>::const_iterator
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
TS_ASSERT_EQUALS(request1.get_time_sent(),
|
||||
TestUtil::requests.at(1)->get_time_sent()) ;
|
||||
|
||||
for (std::vector<AccessPoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
for (std::vector<CapturePoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
i != TestUtil::aps.end() ; ++i)
|
||||
{
|
||||
std::unordered_map<std::string, Measurement>::const_iterator
|
||||
|
@ -122,7 +122,7 @@ public:
|
|||
TS_ASSERT_EQUALS(request1.get_time_sent(),
|
||||
TestUtil::requests.at(2)->get_time_sent()) ;
|
||||
|
||||
for (std::vector<AccessPoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
for (std::vector<CapturePoint>::const_iterator i = TestUtil::aps.begin() ;
|
||||
i != TestUtil::aps.end() ; ++i)
|
||||
{
|
||||
std::unordered_map<std::string, Measurement>::const_iterator
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
algo->compute(request) ; // yes, that's ugly
|
||||
|
||||
char ap_gain = 5, ap_power = 20, ap_channel = 1 ;
|
||||
AccessPoint ap(Point3D(), "", "", ap_gain, ap_power, ap_channel) ;
|
||||
CapturePoint ap(Point3D(), "", "", ap_gain, ap_power, ap_channel) ;
|
||||
|
||||
std::vector<int> ss_list ;
|
||||
ss_list.push_back(-42) ;
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
TS_ASSERT_EQUALS(m00, m01) ;
|
||||
|
||||
// Copy constructor
|
||||
AccessPoint ap1 ;
|
||||
CapturePoint ap1 ;
|
||||
Measurement m1(&ap1) ;
|
||||
Measurement m2(m1) ;
|
||||
TS_ASSERT_EQUALS(m1, m2) ;
|
||||
|
@ -25,17 +25,17 @@ public:
|
|||
void test_accessors(void)
|
||||
{
|
||||
// Simple read accessors
|
||||
AccessPoint ap1 ;
|
||||
CapturePoint ap1 ;
|
||||
std::vector<int> vi1 ;
|
||||
Measurement m1(&ap1, vi1) ;
|
||||
TS_ASSERT_EQUALS(m1.get_ap(), &ap1) ;
|
||||
TS_ASSERT_EQUALS(m1.get_cp(), &ap1) ;
|
||||
TS_ASSERT_EQUALS(m1.get_ss_list(), vi1) ;
|
||||
TS_ASSERT_EQUALS(m1.get_average_dbm(), 0) ;
|
||||
|
||||
// Write & read accessors
|
||||
AccessPoint ap2 ;
|
||||
m1.set_ap(&ap2) ;
|
||||
TS_ASSERT_EQUALS(m1.get_ap(), &ap2) ;
|
||||
CapturePoint ap2 ;
|
||||
m1.set_cp(&ap2) ;
|
||||
TS_ASSERT_EQUALS(m1.get_cp(), &ap2) ;
|
||||
|
||||
m1.add_ss(-33) ;
|
||||
m1.add_ss(-78) ;
|
||||
|
@ -101,13 +101,13 @@ public:
|
|||
void test_operators(void)
|
||||
{
|
||||
// ==
|
||||
AccessPoint ap1 ;
|
||||
CapturePoint ap1 ;
|
||||
Measurement m1(&ap1) ;
|
||||
Measurement m2(&ap1) ;
|
||||
TS_ASSERT_EQUALS(m1, m2) ;
|
||||
|
||||
// !=
|
||||
AccessPoint ap2 ;
|
||||
CapturePoint ap2 ;
|
||||
Measurement m3(&ap2) ;
|
||||
TS_ASSERT(m1 != m3) ;
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ public:
|
|||
float step = 0.5 ;
|
||||
TrilaterationMethod *minmax = new MinMax(start, stop, step) ;
|
||||
|
||||
AccessPoint
|
||||
CapturePoint
|
||||
ap1(Point3D(0,0,0)),
|
||||
ap2(Point3D(10,0,0)),
|
||||
ap3(Point3D(0,10,0)),
|
||||
ap4(Point3D(5,5,4)) ;
|
||||
std::unordered_map<AccessPoint*, float> ap_distances ;
|
||||
std::unordered_map<CapturePoint*, float> ap_distances ;
|
||||
ap_distances[&ap1] = 7.071 ;
|
||||
ap_distances[&ap2] = 7.071 ;
|
||||
ap_distances[&ap3] = 7.071 ;
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
void test_ss_square_distance(void)
|
||||
{
|
||||
AccessPoint ap1(Point3D(1,2,3), "aa:bb:cc:dd:ee:ff") ;
|
||||
CapturePoint ap1(Point3D(1,2,3), "aa:bb:cc:dd:ee:ff") ;
|
||||
CalibrationRequest calibrationrequest1 ;
|
||||
Measurement measurement1(&ap1) ;
|
||||
measurement1.add_ss(-78) ;
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
// Simple read accessors
|
||||
Timestamp current_time ;
|
||||
current_time.now() ;
|
||||
AccessPoint ap1(Point3D(1,2,3), "192.168.0.1", "aa:bb:cc:dd:ee:ff") ;
|
||||
CapturePoint ap1(Point3D(1,2,3), "192.168.0.1", "aa:bb:cc:dd:ee:ff") ;
|
||||
Measurement meas1(&ap1) ;
|
||||
std::unordered_map<std::string, Measurement> measurements ;
|
||||
measurements["aa:bb:cc:dd:ee:ff"] = meas1 ;
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
r1.set_time_sent(current_time) ;
|
||||
TS_ASSERT_EQUALS(r1.get_time_sent(), current_time) ;
|
||||
|
||||
AccessPoint ap2(Point3D(3,2,1), "192.168.0.2", "aa:bb:cc:dd:ee:02") ;
|
||||
CapturePoint ap2(Point3D(3,2,1), "192.168.0.2", "aa:bb:cc:dd:ee:02") ;
|
||||
Measurement meas2(&ap2) ;
|
||||
measurements["aa:bb:cc:dd:ee:02"] = meas2 ;
|
||||
r1.set_measurements(measurements) ;
|
||||
|
|
|
@ -78,26 +78,26 @@ public:
|
|||
element_not_found) ;
|
||||
}
|
||||
|
||||
void test_aps(void)
|
||||
void test_cps(void)
|
||||
{
|
||||
TS_ASSERT_THROWS(Stock::get_ap("aa:bb:cc:dd:ee:ff"),
|
||||
TS_ASSERT_THROWS(Stock::get_cp("aa:bb:cc:dd:ee:ff"),
|
||||
element_not_found) ;
|
||||
|
||||
AccessPoint ap1 ;
|
||||
TS_ASSERT_EQUALS(Stock::getw_ap("00:00:00:00:02:01"), ap1) ;
|
||||
CapturePoint ap1 ;
|
||||
TS_ASSERT_EQUALS(Stock::getw_cp("00:00:00:00:02:01"), ap1) ;
|
||||
|
||||
AccessPoint ap2(Point3D(1,2,3), "192.168.2.1", "00:00:00:00:02:02",
|
||||
CapturePoint ap2(Point3D(1,2,3), "192.168.2.1", "00:00:00:00:02:02",
|
||||
8.5, 2.1, 11) ;
|
||||
Stock::getw_ap("00:00:00:00:02:02") = ap2 ;
|
||||
TS_ASSERT_EQUALS(Stock::get_ap("00:00:00:00:02:02"), ap2) ;
|
||||
TS_ASSERT_EQUALS(Stock::getw_ap("00:00:00:00:02:02"), ap2) ;
|
||||
Stock::getw_cp("00:00:00:00:02:02") = ap2 ;
|
||||
TS_ASSERT_EQUALS(Stock::get_cp("00:00:00:00:02:02"), ap2) ;
|
||||
TS_ASSERT_EQUALS(Stock::getw_cp("00:00:00:00:02:02"), ap2) ;
|
||||
|
||||
Stock::clear() ;
|
||||
TS_ASSERT_THROWS(Stock::get_ap("aa:bb:cc:dd:ee:ff"),
|
||||
TS_ASSERT_THROWS(Stock::get_cp("aa:bb:cc:dd:ee:ff"),
|
||||
element_not_found) ;
|
||||
TS_ASSERT_THROWS(Stock::get_ap("00:00:00:00:02:01"),
|
||||
TS_ASSERT_THROWS(Stock::get_cp("00:00:00:00:02:01"),
|
||||
element_not_found) ;
|
||||
TS_ASSERT_THROWS(Stock::get_ap("00:00:00:00:02:02"),
|
||||
TS_ASSERT_THROWS(Stock::get_cp("00:00:00:00:02:02"),
|
||||
element_not_found) ;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ public:
|
|||
|
||||
void test_closest_reference_point(void)
|
||||
{
|
||||
const AccessPoint &ap1 = Stock::find_create_ap("aa:bb:cc:dd:ee:ff") ;
|
||||
const CapturePoint &ap1 = Stock::find_create_cp("aa:bb:cc:dd:ee:ff") ;
|
||||
CalibrationRequest calibrationrequest1 ;
|
||||
Measurement measurement1(&ap1) ;
|
||||
measurement1.add_ss(-23) ;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace std ;
|
||||
|
||||
vector<AccessPoint> TestUtil::aps ;
|
||||
vector<CapturePoint> TestUtil::aps ;
|
||||
vector<Mobile> TestUtil::mobiles ;
|
||||
vector<Request*> TestUtil::requests ;
|
||||
vector<Result> TestUtil::results ;
|
||||
|
@ -36,7 +36,7 @@ void TestUtil::set_up()
|
|||
{
|
||||
tear_down() ;
|
||||
create_mobile_list() ;
|
||||
create_ap_list() ;
|
||||
create_cp_list() ;
|
||||
create_request_list() ;
|
||||
create_result_list() ;
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ void TestUtil::create_mobile_list()
|
|||
mobiles.push_back(mobile1) ;
|
||||
}
|
||||
|
||||
void TestUtil::create_ap_list()
|
||||
void TestUtil::create_cp_list()
|
||||
{
|
||||
AccessPoint ap1 ;
|
||||
CapturePoint ap1 ;
|
||||
ap1.set_mac_addr("11:22:33:44:55:01") ;
|
||||
aps.push_back(ap1) ;
|
||||
ap1.set_mac_addr("11:22:33:44:55:02") ;
|
||||
|
@ -69,46 +69,46 @@ void TestUtil::create_request_list()
|
|||
|
||||
measurement1.add_ss(-58) ;
|
||||
measurement1.add_ss(-55) ;
|
||||
measurement1.set_ap(&aps[0]) ;
|
||||
measurement1.set_cp(&aps[0]) ;
|
||||
measurements[0][aps[0].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-50) ;
|
||||
measurement1.set_ap(&aps[2]) ;
|
||||
measurement1.set_cp(&aps[2]) ;
|
||||
measurements[0][aps[2].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-42) ;
|
||||
measurement1.add_ss(-37) ;
|
||||
measurement1.set_ap(&aps[1]) ;
|
||||
measurement1.set_cp(&aps[1]) ;
|
||||
measurements[0][aps[1].get_mac_addr()] = measurement1 ;
|
||||
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-51) ;
|
||||
measurement1.add_ss(-19) ;
|
||||
measurement1.set_ap(&aps[0]) ;
|
||||
measurement1.set_cp(&aps[0]) ;
|
||||
measurements[1][aps[0].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-70) ;
|
||||
measurement1.add_ss(-21) ;
|
||||
measurement1.set_ap(&aps[1]) ;
|
||||
measurement1.set_cp(&aps[1]) ;
|
||||
measurements[1][aps[1].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-59) ;
|
||||
measurement1.set_ap(&aps[2]) ;
|
||||
measurement1.set_cp(&aps[2]) ;
|
||||
measurements[1][aps[2].get_mac_addr()] = measurement1 ;
|
||||
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-54) ;
|
||||
measurement1.add_ss(-32) ;
|
||||
measurement1.set_ap(&aps[0]) ;
|
||||
measurement1.set_cp(&aps[0]) ;
|
||||
measurements[2][aps[0].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-45) ;
|
||||
measurement1.add_ss(-23) ;
|
||||
measurement1.set_ap(&aps[1]) ;
|
||||
measurement1.set_cp(&aps[1]) ;
|
||||
measurements[2][aps[1].get_mac_addr()] = measurement1 ;
|
||||
measurement1.clear() ;
|
||||
measurement1.add_ss(-56) ;
|
||||
measurement1.set_ap(&aps[2]) ;
|
||||
measurement1.set_cp(&aps[2]) ;
|
||||
measurements[2][aps[2].get_mac_addr()] = measurement1 ;
|
||||
|
||||
// Create timestamp list
|
||||
|
@ -349,12 +349,12 @@ bool TestUtil::measurement_equals(const Measurement &first,
|
|||
return false ;
|
||||
|
||||
// Compare ap values
|
||||
if (first.get_ap() == NULL || second.get_ap() == NULL)
|
||||
if (first.get_cp() == NULL || second.get_cp() == NULL)
|
||||
{
|
||||
if (first.get_ap() != NULL || second.get_ap() != NULL)
|
||||
if (first.get_cp() != NULL || second.get_cp() != NULL)
|
||||
return false ;
|
||||
}
|
||||
else if (*first.get_ap() != *second.get_ap())
|
||||
else if (*first.get_cp() != *second.get_cp())
|
||||
return false ;
|
||||
|
||||
// Compare ss_list
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _OWLPS_POSITIONING_TESTS_TESTUTIL_HH_
|
||||
#define _OWLPS_POSITIONING_TESTS_TESTUTIL_HH_
|
||||
|
||||
#include "accesspoint.hh"
|
||||
#include "capturepoint.hh"
|
||||
#include "mobile.hh"
|
||||
#include "request.hh"
|
||||
#include "measurement.hh"
|
||||
|
@ -16,12 +16,12 @@ class TestUtil
|
|||
{
|
||||
private:
|
||||
static void create_mobile_list(void) ;
|
||||
static void create_ap_list(void) ;
|
||||
static void create_cp_list(void) ;
|
||||
static void create_request_list(void) ;
|
||||
static void create_result_list(void) ;
|
||||
|
||||
public:
|
||||
static std::vector<AccessPoint> aps ;
|
||||
static std::vector<CapturePoint> aps ;
|
||||
static std::vector<Mobile> mobiles ;
|
||||
static std::vector<Request*> requests ;
|
||||
static std::vector<Result> results ;
|
||||
|
|
Loading…
Reference in New Issue