Skip to content

Commit

Permalink
[tests] Fixed tests when ENABLE_STDCXX_SYNC=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed May 8, 2020
1 parent c811d77 commit 4c71d90
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace srt::sync;

TEST(SyncDuration, BasicChecks)
{
const steady_clock::duration d;
const steady_clock::duration d = steady_clock::duration();

EXPECT_EQ(d.count(), 0);
EXPECT_TRUE(d == d); // operator==
Expand Down Expand Up @@ -63,7 +63,7 @@ TEST(SyncDuration, DurationFrom)

TEST(SyncDuration, RelOperators)
{
const steady_clock::duration a;
const steady_clock::duration a = steady_clock::duration();

EXPECT_EQ(a.count(), 0);
EXPECT_TRUE(a == a); // operator==
Expand Down Expand Up @@ -190,6 +190,7 @@ TEST(SyncTimePoint, RelOperators)
EXPECT_FALSE(a < b);
}

#ifndef ENABLE_STDCXX_SYNC
TEST(SyncTimePoint, OperatorMinus)
{
const int64_t delta = 1024;
Expand Down Expand Up @@ -254,6 +255,7 @@ TEST(SyncTimePoint, OperatorMinusEqDuration)
r -= steady_clock::duration(-delta);
EXPECT_EQ(r, a);
}
#endif

/*****************************************************************************/
/*
Expand Down

0 comments on commit 4c71d90

Please sign in to comment.