56 lines
1.7 KiB
C++
56 lines
1.7 KiB
C++
#ifndef _OWLPS_POSITIONING_TESTS_TESTUTIL_HH_
|
|
#define _OWLPS_POSITIONING_TESTS_TESTUTIL_HH_
|
|
|
|
#include "accesspoint.hh"
|
|
#include "mobile.hh"
|
|
#include "request.hh"
|
|
#include "measurement.hh"
|
|
#include "referencepoint.hh"
|
|
#include "result.hh"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <boost/tr1/unordered_map.hpp>
|
|
|
|
class TestUtil
|
|
{
|
|
private:
|
|
static void create_mobile_list(void) ;
|
|
static void create_ap_list(void) ;
|
|
static void create_request_list(void) ;
|
|
static void create_result_list(void) ;
|
|
|
|
public:
|
|
static std::vector<AccessPoint> aps ;
|
|
static std::vector<Mobile> mobiles ;
|
|
static std::vector<Request*> requests ;
|
|
static std::vector<Result> results ;
|
|
static std::vector<ReferencePoint> reference_points ;
|
|
|
|
static void set_up(void) ;
|
|
static void tear_down(void) ;
|
|
|
|
static void fill_file(const std::string &output_file_name,
|
|
const std::vector<std::string> output_lines) ;
|
|
static void remove_file(const std::string &file_name) ;
|
|
|
|
static void create_test_csv_file(const std::string &file_name,
|
|
bool with_spaces = false) ;
|
|
|
|
static bool request_equals(const Request &first,
|
|
const Request &second) ;
|
|
static bool measurements_unordered_map_equals(
|
|
std::tr1::unordered_map<std::string,Measurement> first,
|
|
std::tr1::unordered_map<std::string,Measurement> second) ;
|
|
static bool measurement_equals(const Measurement &first,
|
|
const Measurement &second) ;
|
|
|
|
|
|
static bool file_size_equals(const std::string &file1_name,
|
|
const std::string &file2_name) ;
|
|
static off_t file_size(const std::string &file_name) ;
|
|
|
|
} ;
|
|
|
|
#endif // _OWLPS_POSITIONING_TESTS_TESTUTIL_HH_
|