Defines
time_test.cc File Reference
#include "absl/time/time.h"
#include <chrono>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <limits>
#include <string>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/time/clock.h"
#include "absl/time/internal/test_util.h"
Include dependency graph for time_test.cc:

Go to the source code of this file.

Defines

#define EXPECT_CIVIL_INFO(ci, y, m, d, h, min, s, off, isdst)
#define TEST_CONVERSION_ROUND_TRIP(SOURCE, FROM, TO, MATCHER)   EXPECT_THAT(TO(FROM(SOURCE)), MATCHER(SOURCE))
#define TEST_FLOOR_CONVERSION(TO, FROM)

Define Documentation

#define EXPECT_CIVIL_INFO (   ci,
  y,
  m,
  d,
  h,
  min,
  s,
  off,
  isdst 
)
Value:
do {                                                             \
    EXPECT_EQ(y, ci.cs.year());                                    \
    EXPECT_EQ(m, ci.cs.month());                                   \
    EXPECT_EQ(d, ci.cs.day());                                     \
    EXPECT_EQ(h, ci.cs.hour());                                    \
    EXPECT_EQ(min, ci.cs.minute());                                \
    EXPECT_EQ(s, ci.cs.second());                                  \
    EXPECT_EQ(off, ci.offset);                                     \
    EXPECT_EQ(isdst, ci.is_dst);                                   \
    EXPECT_THAT(ci.zone_abbr, testing::MatchesRegex(kZoneAbbrRE)); \
  } while (0)

Definition at line 39 of file time_test.cc.

#define TEST_CONVERSION_ROUND_TRIP (   SOURCE,
  FROM,
  TO,
  MATCHER 
)    EXPECT_THAT(TO(FROM(SOURCE)), MATCHER(SOURCE))
#define TEST_FLOOR_CONVERSION (   TO,
  FROM 
)
Value:
EXPECT_EQ(1, TO(FROM(1001)));         \
  EXPECT_EQ(1, TO(FROM(1000)));         \
  EXPECT_EQ(0, TO(FROM(999)));          \
  EXPECT_EQ(0, TO(FROM(1)));            \
  EXPECT_EQ(0, TO(FROM(0)));            \
  EXPECT_EQ(-1, TO(FROM(-1)));          \
  EXPECT_EQ(-1, TO(FROM(-999)));        \
  EXPECT_EQ(-1, TO(FROM(-1000)));       \
  EXPECT_EQ(-2, TO(FROM(-1001)));


abseil_cpp
Author(s):
autogenerated on Wed Jun 19 2019 19:42:16