worked on wifi-scanner for linux

new time-grouping for vap grouper
adjusted test-cases
minor changes/fixes/improvements
This commit is contained in:
2017-10-11 14:00:24 +02:00
parent 628be72e1f
commit da477866c1
13 changed files with 649 additions and 223 deletions

View File

@@ -52,4 +52,35 @@ TEST(Timestamp, add) {
}
TEST(Timestamp, div) {
Timestamp ts1 = Timestamp::fromMS(1000);
ASSERT_EQ(100, (ts1/(size_t)10).ms());
}
TEST(Timestamp, minmax) {
Timestamp tsLow = std::numeric_limits<Timestamp>::lowest();
Timestamp tsMin = std::numeric_limits<Timestamp>::min();
Timestamp tsMax = std::numeric_limits<Timestamp>::max();
Timestamp ts0 = Timestamp::fromMS(0);
Timestamp tsNeg = Timestamp::fromMS(-99999999999999L);
Timestamp tsPos = Timestamp::fromMS(+99999999999999L);
ASSERT_EQ(tsMin, tsLow);
ASSERT_TRUE(tsMin < tsMax);
ASSERT_TRUE(tsMin < ts0);
ASSERT_TRUE(tsMin < tsNeg);
ASSERT_TRUE(tsMax > tsMin);
ASSERT_TRUE(tsMax > ts0);
ASSERT_TRUE(tsMax > tsPos);
}
#endif