From 2a62fbdedf64673f7c858bc6487bd15bcd2ca180 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 25 Sep 2017 15:35:12 -0700 Subject: [PATCH] Changes imported from Abseil "staging" branch: - 76fcc6eebc6a5b5a885f04e1579762573c2bf9bc Fix broken links, and remove old README files from Git. by Daniel Katz - 174287df7bc7c1832fe4a66d82ee0f61a8788460 Remove "test_dependencies.bzl" file. Not needed. by Daniel Katz - 4e9416b389e61f5258c3a7fc0f7966f03d9ae086 Fix broken about/intro link in README.md by Abseil Team - 2a662ff187987246cf8f3c1de83eaa23f1d2c034 Delete extraneous comments. by Abseil Team - 3bdc2d15af21e0297ccf39c90c0ed51a35900679 Cleanup usage of GUNIT_DEPS_SELECTOR/GUNIT_MAIN_DEPS_SELE... by Gennadiy Rozental - bec32fc8efee3ae5b67c07dcae08d74540c944d0 Enable time_test on windows: by Xiaoyi Zhang GitOrigin-RevId: 76fcc6eebc6a5b5a885f04e1579762573c2bf9bc Change-Id: I9556164f6b48dae1fa02b2ec6444517faed23e1f --- README.md | 29 +++++------ absl/algorithm/BUILD.bazel | 12 ++--- absl/base/BUILD.bazel | 34 +++++++------ absl/container/BUILD.bazel | 19 +++---- absl/memory/BUILD.bazel | 7 +-- absl/memory/README.md | 22 --------- absl/numeric/BUILD.bazel | 7 +-- absl/strings/BUILD.bazel | 61 ++++++++++++++--------- absl/strings/README.md | 87 --------------------------------- absl/test_dependencies.bzl | 40 --------------- absl/time/BUILD.bazel | 5 -- absl/time/format_test.cc | 6 +++ absl/time/internal/test_util.cc | 5 ++ absl/time/time.h | 4 +- absl/types/BUILD.bazel | 19 +++---- absl/utility/BUILD.bazel | 7 +-- 16 files changed, 116 insertions(+), 248 deletions(-) delete mode 100644 absl/memory/README.md delete mode 100644 absl/strings/README.md delete mode 100644 absl/test_dependencies.bzl diff --git a/README.md b/README.md index 0301f6112..2d78e46db 100644 --- a/README.md +++ b/README.md @@ -33,40 +33,40 @@ a whole. Abseil contains the following C++ library components: -* [`base`](base/) Abseil Fundamentals +* [`base`](absl/base/) Abseil Fundamentals
The `base` library contains initialization code and other code which all other Abseil code depends on. Code within `base` may not depend on any other code (other than the C++ standard library). -* [`algorithm`](algorithm/) +* [`algorithm`](absl/algorithm/)
The `algorithm` library contains additions to the C++ `` library and container-based versions of such algorithms. -* [`container`](container) +* [`container`](absl/container/)
The `container` library contains additional STL-style containers. -* [`debugging`](debugging) +* [`debugging`](absl/debugging/)
The `debugging` library contains code useful for enabling leak checks. Future updates will add stacktrace and symbolization utilities. -* [`memory`](memory) +* [`memory`](absl/memory/)
The `memory` library contains C++11-compatible versions of `std::make_unique()` and related memory management facilities. -* [`meta`](meta) +* [`meta`](absl/meta/)
The `meta` library contains C++11-compatible versions of type checks available within C++14 and C++17 versions of the C++ `` library. -* [`numeric`](numeric) +* [`numeric`](absl/numeric/)
The `numeric` library contains C++11-compatible 128-bit integers. -* [`strings`](strings) +* [`strings`](absl/strings/)
The `strings` library contains a variety of strings routines and utilities, including a C++11-compatible version of the C++17 `std::string_view` type. -* [`synchronization`](synchronization) +* [`synchronization`](absl/synchronization/)
The `synchronization` library contains concurrency primitives (Abseil's `absl::Mutex` class, an alternative to `std::mutex`) and a variety of synchronization abstractions. -* [`time`](time) +* [`time`](absl/time/)
The `time` library contains abstractions for computing with absolute points in time, durations of time, and formatting and parsing time within time zones. -* [`types`](types) -
The `types` library contains non-container utility types, like a +* [`types`](absl/types/) +
The `types` library contains non-container utility types, like a C++11-compatible version of `absl::optional`. ## License @@ -78,10 +78,11 @@ license. See [LICENSE](LICENSE) for more information. For more information about Abseil: -* Consult our [Abseil Introduction](http://abseil.io/about/about/intro) +* Consult our [Abseil Introduction](http://abseil.io/about/intro) * Read [Why Adopt Abseil](http://abseil.io/about/philosophy) to understand our design philosophy. -* Peruse our [Abseil Project Contract](http://abseil.io/about/contract) to +* Peruse our + [Abseil Compatibility Guarantees](http://abseil.io/about/compatibility) to understand both what we promise to you, and what we expect of you in return. ## Disclaimer diff --git a/absl/algorithm/BUILD.bazel b/absl/algorithm/BUILD.bazel index 5890bf172..255b986e9 100644 --- a/absl/algorithm/BUILD.bazel +++ b/absl/algorithm/BUILD.bazel @@ -19,10 +19,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -39,7 +35,10 @@ cc_test( size = "small", srcs = ["algorithm_test.cc"], copts = ABSL_TEST_COPTS, - deps = [":algorithm"] + select(GUNIT_MAIN_DEPS_SELECTOR), + deps = [ + ":algorithm", + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -65,5 +64,6 @@ cc_test( "//absl/base:core_headers", "//absl/memory", "//absl/types:span", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel index 4c1b50952..5f8863599 100644 --- a/absl/base/BUILD.bazel +++ b/absl/base/BUILD.bazel @@ -20,11 +20,6 @@ load( "ABSL_TEST_COPTS", "ABSL_EXCEPTIONS_FLAG", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", - "GUNIT_MAIN_NO_LEAK_CHECK_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -176,7 +171,8 @@ cc_test( deps = [ ":base", ":core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -200,7 +196,8 @@ cc_test( copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG, deps = [ ":throw_delegate", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -221,9 +218,10 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":base_internal", - "//absl/strings", "//absl/memory", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "//absl/strings", + "@com_google_googletest//:gtest_main", + ], ) # Common test library made available for use in non-absl code that overrides @@ -278,7 +276,8 @@ cc_test( ":base", ":config", ":endian", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -287,7 +286,8 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":config", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -298,7 +298,8 @@ cc_test( ":base", ":core_headers", "//absl/synchronization", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -319,7 +320,8 @@ cc_test( deps = [ ":base", "//absl/synchronization", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -347,7 +349,8 @@ cc_test( ":base", ":core_headers", "//absl/synchronization", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -369,5 +372,6 @@ cc_test( ], deps = [ ":malloc_extension", - ] + select(GUNIT_MAIN_NO_LEAK_CHECK_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/container/BUILD.bazel b/absl/container/BUILD.bazel index 625cef106..ee017431c 100644 --- a/absl/container/BUILD.bazel +++ b/absl/container/BUILD.bazel @@ -19,10 +19,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -49,7 +45,8 @@ cc_test( "//absl/base:core_headers", "//absl/base:exception_testing", "//absl/memory", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -61,7 +58,8 @@ cc_test( "//absl/base:core_headers", "//absl/base:exception_testing", "//absl/memory", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -88,7 +86,8 @@ cc_test( "//absl/base:exception_testing", "//absl/memory", "//absl/strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -103,7 +102,8 @@ cc_test( "//absl/base:exception_testing", "//absl/memory", "//absl/strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -120,5 +120,6 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":test_instance_tracker", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/memory/BUILD.bazel b/absl/memory/BUILD.bazel index 91fc55fc4..7265693f1 100644 --- a/absl/memory/BUILD.bazel +++ b/absl/memory/BUILD.bazel @@ -19,10 +19,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -43,5 +39,6 @@ cc_test( ":memory", "//absl/base", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/memory/README.md b/absl/memory/README.md deleted file mode 100644 index 72eddd9c0..000000000 --- a/absl/memory/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# ABSL Memory - -This directory contains packages related to abstractions for managing memory -within objects. - -## Library Listing - -Only one library target exists within this directory at this time: - -* **memory** (`//absl/memory:memory`) provides classes and - utility functions for managing memory associated with pointers. - - -## Memory Library File Listing - -The following header files are directly included within the -`absl::memory` library: - -### Smart Pointer Management - -* `memory.h` -
Pointer memory management abstractions for handling unique pointers diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel index 2c80db302..9c3653e9f 100644 --- a/absl/numeric/BUILD.bazel +++ b/absl/numeric/BUILD.bazel @@ -3,10 +3,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -35,5 +31,6 @@ cc_test( "//absl/base", "//absl/base:core_headers", "//absl/meta:type_traits", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel index da441e201..c28f89e17 100644 --- a/absl/strings/BUILD.bazel +++ b/absl/strings/BUILD.bazel @@ -18,11 +18,6 @@ # that are not low level. For more information, including how to submit # changes to this file, see http://www/eng/howto/build-monitors.html -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", - "GUNIT_DEPS_SELECTOR", -) load( "//absl:copts.bzl", "ABSL_DEFAULT_COPTS", @@ -109,7 +104,10 @@ cc_test( size = "small", srcs = ["match_test.cc"], copts = ABSL_TEST_COPTS, - deps = [":strings"] + select(GUNIT_MAIN_DEPS_SELECTOR), + deps = [ + ":strings", + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -124,7 +122,8 @@ cc_test( ":strings", "//absl/base:core_headers", "//absl/container:fixed_array", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -135,7 +134,8 @@ cc_test( deps = [ ":strings", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -149,7 +149,8 @@ cc_test( deps = [ ":strings", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -160,10 +161,11 @@ cc_test( ], copts = ABSL_TEST_COPTS, deps = [ - ":strings", ":internal", + ":strings", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -173,10 +175,11 @@ cc_test( copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG, deps = [ ":strings", - "//absl/base:core_headers", "//absl/base:config", + "//absl/base:core_headers", "//absl/base:dynamic_annotations", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -187,7 +190,8 @@ cc_test( deps = [ ":strings", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -197,7 +201,8 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -208,7 +213,8 @@ cc_test( ":strings", "//absl/base:core_headers", "//absl/base:dynamic_annotations", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -218,7 +224,8 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":internal", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -232,7 +239,8 @@ cc_test( deps = [ "//absl/base:core_headers", "//absl/meta:type_traits", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -244,7 +252,8 @@ cc_test( ":strings", "//absl/base:core_headers", "//absl/memory", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -255,7 +264,8 @@ cc_test( deps = [ ":strings", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -273,7 +283,8 @@ cc_test( ":strings", "//absl/base", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -281,7 +292,10 @@ cc_test( size = "small", srcs = ["strip_test.cc"], copts = ABSL_TEST_COPTS, - deps = [":strings"] + select(GUNIT_MAIN_DEPS_SELECTOR), + deps = [ + ":strings", + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -290,5 +304,6 @@ cc_test( copts = ABSL_TEST_COPTS, deps = [ ":internal", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/strings/README.md b/absl/strings/README.md deleted file mode 100644 index d5320eb0a..000000000 --- a/absl/strings/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# ABSL Strings - -This directory contains packages related to std::string operations and std::string -alternatives (such as character-agnostic byte manipulation packages). - -## Library Listing - -Two library targets are available within this directory: - -* **strings** (`//absl/strings:strings`) provides classes and - utility functions for manipulating and comparing strings, converting other - types (such as integers) into strings, or evaluating strings for other usages - (such as tokenization). - -* **cord** (`//absl/strings:cord`) provides classes and utility - functions for manipulating `Cord` elements. A `Cord` is a sequence of - characters that internally uses a tree structure to store their data, - avoiding the need for long regions of contiguous memory, and allows memory - sharing, sub-std::string copy-on-write, and a host of other advanced std::string - features. - -## Strings Library File Listing - -The following header files are directly included within the -`absl::strings` library. - -## Alternate std::string-like Classes - -* `bytestream.h` -
Abstraction of std::string for I/O -* `string_view.h` -
Pointer to part or all of another std::string - -## Formatting and Parsing - -* `numbers.h` -
Converter between strings and numbers. Prefer `str_cat.h` for numbers - to strings - -## Operations on Characters - -* `ascii_ctype.h` -
Char classifiers like <ctype.h> but faster -* `charset.h` -
Bitmap from unsigned char -> bool - -## Operations on Strings - -* `case.h` -
Case-changers -* `escaping.h` -
Escapers and unescapers -* `str_join.h` -
Joiner functions using a delimiter -* `str_split.h` -
Split functions -* `str_cat.h` -
Concatenators and appenders -* `string_view_utils.h` -
Utility functions for strings -* `strip.h` -
Character removal functions -* `substitute.h` -
Printf-like typesafe formatter - -## Miscellaneous - -* `util.h` -
Grab bag of useful std::string functions - - -## Cord Library File Listing - -The following header files are directly included within the -`absl::strings::cord` library: - -## The `Cord` Class - -* `cord.h` -
A std::string built from a tree of shareable nodes - -## Operations on Cords - -* `cord_cat.h` -
Concatenator functions for cords -* `cord_util.h` -
Utility functions for cords diff --git a/absl/test_dependencies.bzl b/absl/test_dependencies.bzl deleted file mode 100644 index 0190c3001..000000000 --- a/absl/test_dependencies.bzl +++ /dev/null @@ -1,40 +0,0 @@ -"""Common definitions of gunit and gmock dependencies for Abseil.""" - -# pylint: disable=pointless-std::string-statement - -# TODO(absl-team): Clean up below selectors when possible. Hold on to them for -# now as we may still need our own gunit_main selectors that do not bring in any -# heapchecker-related deps, and possibly to deal with benchmark dependencies. - -"""Use GUNIT_DEPS_SELECTOR when you don't need gunit_main.""" -GUNIT_DEPS_SELECTOR = { - "//conditions:default": [ - "@com_google_googletest//:gtest", - ], -} - -"""Use GUNIT_MAIN_DEPS_SELECTOR to get gunit_main with leak checking.""" -GUNIT_MAIN_DEPS_SELECTOR = { - "//conditions:default": [ - "@com_google_googletest//:gtest_main", - ], -} - -# TODO(absl-team): In order to set up absl deps on leak checking -# without base, we'll need gunit_main without either -# base:heapcheck or base:noheapcheck. -GUNIT_MAIN_NO_LEAK_CHECK_DEPS = [ - "@com_google_googletest//:gtest_main", -] - -# TODO(alanjones): Merge this into @com_google_googletest//:gunit_main_no_heapcheck -GUNIT_MAIN_NO_LEAK_CHECK_PORTABLE_DEPS = [ - "@com_google_googletest//:gtest_main", -] - -"""Use GUNIT_MAIN_NO_LEAK_CHECK_DEPS_SELECTOR to turn off leak checking.""" -GUNIT_MAIN_NO_LEAK_CHECK_DEPS_SELECTOR = { - "//absl:ios": GUNIT_MAIN_NO_LEAK_CHECK_PORTABLE_DEPS, - "//absl:windows": GUNIT_MAIN_NO_LEAK_CHECK_PORTABLE_DEPS, - "//conditions:default": GUNIT_MAIN_NO_LEAK_CHECK_DEPS, -} diff --git a/absl/time/BUILD.bazel b/absl/time/BUILD.bazel index 0d340f25c..c34f52489 100644 --- a/absl/time/BUILD.bazel +++ b/absl/time/BUILD.bazel @@ -19,10 +19,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -85,7 +81,6 @@ cc_test( "no_test_android_x86", "no_test_ios_x86_64", "no_test_loonix", - "no_test_msvc_x64", ], deps = [ ":test_util", diff --git a/absl/time/format_test.cc b/absl/time/format_test.cc index b139ff6f1..09d1fe666 100644 --- a/absl/time/format_test.cc +++ b/absl/time/format_test.cc @@ -392,6 +392,11 @@ TEST(FormatParse, RoundTrip) { EXPECT_EQ(in, out); // RFC1123_full includes %z } + // `absl::FormatTime()` falls back to strftime() for "%c", which appears to + // work. On Windows, `absl::ParseTime()` falls back to std::get_time() which + // appears to fail on "%c" (or at least on the "%c" text produced by + // `strftime()`). This makes it fail the round-trip test. +#ifndef _MSC_VER // Even though we don't know what %c will produce, it should roundtrip, // but only in the 0-offset timezone. { @@ -400,6 +405,7 @@ TEST(FormatParse, RoundTrip) { EXPECT_TRUE(absl::ParseTime("%c", s, &out, &err)) << s << ": " << err; EXPECT_EQ(in, out); } +#endif // _MSC_VER } TEST(FormatParse, RoundTripDistantFuture) { diff --git a/absl/time/internal/test_util.cc b/absl/time/internal/test_util.cc index 21d5f2a66..1a415f894 100644 --- a/absl/time/internal/test_util.cc +++ b/absl/time/internal/test_util.cc @@ -64,8 +64,13 @@ const struct ZoneInfo { reinterpret_cast(America_Los_Angeles), America_Los_Angeles_len}, // Allows use of the local time zone from a common system-specific location. +#ifdef _MSC_VER + {"localtime", // + reinterpret_cast(America_Los_Angeles), America_Los_Angeles_len}, +#else {"/etc/localtime", // reinterpret_cast(America_Los_Angeles), America_Los_Angeles_len}, +#endif }; class TestZoneInfoSource : public cctz::ZoneInfoSource { diff --git a/absl/time/time.h b/absl/time/time.h index 697634370..b0ebf6ee8 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -992,8 +992,7 @@ bool ParseTime(const std::string& format, const std::string& input, TimeZone tz, // --start_time=2016-01-02T03:04:05.678+08:00 // // Note: A UTC offset (or 'Z' indicating a zero-offset from UTC) is required. -// If your application doesn't have a UTC offset to specify, perhaps you're -// really specifying a Civil Time +// // Additionally, if you'd like to specify a time as a count of // seconds/milliseconds/etc from the Unix epoch, use a absl::Duration flag and // add that duration to absl::UnixEpoch() to get a absl::Time. @@ -1026,7 +1025,6 @@ std::string UnparseFlag(Time t); // - https://github.com/google/cctz // - http://www.iana.org/time-zones // - http://en.wikipedia.org/wiki/Zoneinfo -// TimeZone backing data with your binary. class TimeZone { public: explicit TimeZone(cctz::time_zone tz) : cz_(tz) {} diff --git a/absl/types/BUILD.bazel b/absl/types/BUILD.bazel index f1e432d19..96b09521e 100644 --- a/absl/types/BUILD.bazel +++ b/absl/types/BUILD.bazel @@ -20,10 +20,6 @@ load( "ABSL_TEST_COPTS", "ABSL_EXCEPTIONS_FLAG", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -69,7 +65,8 @@ cc_test( "//absl/base:config", "//absl/base:exception_testing", "//absl/container:test_instance_tracker", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -85,7 +82,8 @@ cc_test( "//absl/base:config", "//absl/base:exception_testing", "//absl/container:test_instance_tracker", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -114,7 +112,8 @@ cc_test( "//absl/container:fixed_array", "//absl/container:inlined_vector", "//absl/strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_test( @@ -130,7 +129,8 @@ cc_test( "//absl/container:fixed_array", "//absl/container:inlined_vector", "//absl/strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) cc_library( @@ -174,5 +174,6 @@ cc_test( "//absl/base:config", "//absl/meta:type_traits", "//absl/strings", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], ) diff --git a/absl/utility/BUILD.bazel b/absl/utility/BUILD.bazel index 73d051992..dd30db708 100644 --- a/absl/utility/BUILD.bazel +++ b/absl/utility/BUILD.bazel @@ -3,10 +3,6 @@ load( "ABSL_DEFAULT_COPTS", "ABSL_TEST_COPTS", ) -load( - "//absl:test_dependencies.bzl", - "GUNIT_MAIN_DEPS_SELECTOR", -) package(default_visibility = ["//visibility:public"]) @@ -30,5 +26,6 @@ cc_test( deps = [ ":utility", "//absl/base:core_headers", - ] + select(GUNIT_MAIN_DEPS_SELECTOR), + "@com_google_googletest//:gtest_main", + ], )