Run clang-format over all project C/C++ source and header files (.c, .cpp, .cc, .h, .hpp, .hh, .m, .mm) under app/ and tests/. Non-source files (svg, qm, qrc, etc.) were not touched.
43 lines
668 B
C++
43 lines
668 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include "common/jobtime.h"
|
|
|
|
TEST(CommonJobTime, ConstructorAcquiresValue)
|
|
{
|
|
olive::JobTime a;
|
|
olive::JobTime b;
|
|
|
|
EXPECT_NE(a.value(), b.value());
|
|
EXPECT_LT(a.value(), b.value());
|
|
}
|
|
|
|
TEST(CommonJobTime, AcquireUpdatesValue)
|
|
{
|
|
olive::JobTime a;
|
|
uint64_t first = a.value();
|
|
a.Acquire();
|
|
uint64_t second = a.value();
|
|
|
|
EXPECT_GT(second, first);
|
|
}
|
|
|
|
TEST(CommonJobTime, ComparisonOperators)
|
|
{
|
|
olive::JobTime a;
|
|
olive::JobTime b;
|
|
|
|
EXPECT_LT(a, b);
|
|
EXPECT_GT(b, a);
|
|
EXPECT_LE(a, a);
|
|
EXPECT_GE(b, b);
|
|
EXPECT_EQ(a, a);
|
|
EXPECT_NE(a, b);
|
|
}
|
|
|
|
TEST(CommonJobTime, DebugStream)
|
|
{
|
|
olive::JobTime a;
|
|
QDebug debug(QtDebugMsg);
|
|
debug << a;
|
|
}
|