32 lines
808 B
C++
32 lines
808 B
C++
#ifdef WITH_TESTS
|
|
|
|
#include "../../Tests.h"
|
|
|
|
#include "../../../sensors/offline/OfflineAndroid.h"
|
|
|
|
TEST(Offline, test1) {
|
|
OfflineAndroid off;
|
|
off.parse(getDataFile("offlineAndroid.dat"));
|
|
ASSERT_EQ(6, off.getGroundTruth().size());
|
|
ASSERT_EQ(1, off.getWiFi().size());
|
|
}
|
|
|
|
// cleanup pattern
|
|
// ^[0-9]*;(-1|0|1|2|3|4|5|6|7|9|10|11);.*
|
|
TEST(Offline, test2) {
|
|
OfflineAndroid off;
|
|
off.parse(getDataFile("path4wifi.dat"));
|
|
ASSERT_EQ(20, off.getGroundTruth().size());
|
|
}
|
|
|
|
|
|
TEST(Offline, testPath) {
|
|
OfflineAndroid off;
|
|
off.parse(getDataFile("train/walks/path4_nexus_backward.dat"));
|
|
ASSERT_EQ(21, off.getGroundTruth().size());
|
|
ASSERT_EQ(off.getWalkedPath().pos_cm[0], off.getWalkedPath().pos_cm[1]); // same waypoint twice. not moving within first few seconds
|
|
off.getWalkedPathInterpolatorCM();
|
|
}
|
|
|
|
#endif
|