summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2017-09-25 15:35:12 -0700
committerGravatar katzdm <katzdm@google.com>2017-09-25 18:36:47 -0400
commit2a62fbdedf64673f7c858bc6487bd15bcd2ca180 (patch)
treef77d635ce2247cca963fcb35e8816a1787f0f7eb
parentcf6ab6bb2b800fae859ccc735f398d22a7336a00 (diff)
Changes imported from Abseil "staging" branch:
- 76fcc6eebc6a5b5a885f04e1579762573c2bf9bc Fix broken links, and remove old README files from Git. by Daniel Katz <katzdm@google.com> - 174287df7bc7c1832fe4a66d82ee0f61a8788460 Remove "test_dependencies.bzl" file. Not needed. by Daniel Katz <katzdm@google.com> - 4e9416b389e61f5258c3a7fc0f7966f03d9ae086 Fix broken about/intro link in README.md by Abseil Team <absl-team@google.com> - 2a662ff187987246cf8f3c1de83eaa23f1d2c034 Delete extraneous comments. by Abseil Team <absl-team@google.com> - 3bdc2d15af21e0297ccf39c90c0ed51a35900679 Cleanup usage of GUNIT_DEPS_SELECTOR/GUNIT_MAIN_DEPS_SELE... by Gennadiy Rozental <rogeeff@google.com> - bec32fc8efee3ae5b67c07dcae08d74540c944d0 Enable time_test on windows: by Xiaoyi Zhang <zhangxy@google.com> GitOrigin-RevId: 76fcc6eebc6a5b5a885f04e1579762573c2bf9bc Change-Id: I9556164f6b48dae1fa02b2ec6444517faed23e1f
-rw-r--r--README.md29
-rw-r--r--absl/algorithm/BUILD.bazel12
-rw-r--r--absl/base/BUILD.bazel34
-rw-r--r--absl/container/BUILD.bazel19
-rw-r--r--absl/memory/BUILD.bazel7
-rw-r--r--absl/memory/README.md22
-rw-r--r--absl/numeric/BUILD.bazel7
-rw-r--r--absl/strings/BUILD.bazel61
-rw-r--r--absl/strings/README.md87
-rw-r--r--absl/test_dependencies.bzl40
-rw-r--r--absl/time/BUILD.bazel5
-rw-r--r--absl/time/format_test.cc6
-rw-r--r--absl/time/internal/test_util.cc5
-rw-r--r--absl/time/time.h4
-rw-r--r--absl/types/BUILD.bazel19
-rw-r--r--absl/utility/BUILD.bazel7
16 files changed, 116 insertions, 248 deletions
diff --git a/README.md b/README.md
index 0301f611..2d78e46d 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
<br /> 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/)
<br /> The `algorithm` library contains additions to the C++ `<algorithm>`
library and container-based versions of such algorithms.
-* [`container`](container)
+* [`container`](absl/container/)
<br /> The `container` library contains additional STL-style containers.
-* [`debugging`](debugging)
+* [`debugging`](absl/debugging/)
<br /> The `debugging` library contains code useful for enabling leak
checks. Future updates will add stacktrace and symbolization utilities.
-* [`memory`](memory)
+* [`memory`](absl/memory/)
<br /> The `memory` library contains C++11-compatible versions of
`std::make_unique()` and related memory management facilities.
-* [`meta`](meta)
+* [`meta`](absl/meta/)
<br /> The `meta` library contains C++11-compatible versions of type checks
available within C++14 and C++17 versions of the C++ `<type_traits>` library.
-* [`numeric`](numeric)
+* [`numeric`](absl/numeric/)
<br /> The `numeric` library contains C++11-compatible 128-bit integers.
-* [`strings`](strings)
+* [`strings`](absl/strings/)
<br /> 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/)
<br /> 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/)
<br /> 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)
- <br /> The `types` library contains non-container utility types, like a
+* [`types`](absl/types/)
+ <br /> 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 5890bf17..255b986e 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 4c1b5095..5f886359 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 625cef10..ee017431 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 91fc55fc..7265693f 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 72eddd9c..00000000
--- 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`
- <br/>Pointer memory management abstractions for handling unique pointers
diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel
index 2c80db30..9c3653e9 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 da441e20..c28f89e1 100644
--- a/absl/strings/BUILD.bazel
+++ b/absl/strings/BUILD.bazel
@@ -19,11 +19,6 @@
# 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",
"ABSL_TEST_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 d5320eb0..00000000
--- 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`
- <br/>Abstraction of std::string for I/O
-* `string_view.h`
- <br/>Pointer to part or all of another std::string
-
-## Formatting and Parsing
-
-* `numbers.h`
- <br/>Converter between strings and numbers. Prefer `str_cat.h` for numbers
- to strings
-
-## Operations on Characters
-
-* `ascii_ctype.h`
- <br/>Char classifiers like &lt;ctype.h&gt; but faster
-* `charset.h`
- <br/>Bitmap from unsigned char -&gt; bool
-
-## Operations on Strings
-
-* `case.h`
- <br/>Case-changers
-* `escaping.h`
- <br/>Escapers and unescapers
-* `str_join.h`
- <br/>Joiner functions using a delimiter
-* `str_split.h`
- <br/>Split functions
-* `str_cat.h`
- <br/>Concatenators and appenders
-* `string_view_utils.h`
- <br>Utility functions for strings
-* `strip.h`
- <br/>Character removal functions
-* `substitute.h`
- <br/>Printf-like typesafe formatter
-
-## Miscellaneous
-
-* `util.h`
- <br/>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`
- <br/>A std::string built from a tree of shareable nodes
-
-## Operations on Cords
-
-* `cord_cat.h`
- <br/>Concatenator functions for cords
-* `cord_util.h`
- <br/>Utility functions for cords
diff --git a/absl/test_dependencies.bzl b/absl/test_dependencies.bzl
deleted file mode 100644
index 0190c300..00000000
--- 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 0d340f25..c34f5248 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 b139ff6f..09d1fe66 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 21d5f2a6..1a415f89 100644
--- a/absl/time/internal/test_util.cc
+++ b/absl/time/internal/test_util.cc
@@ -64,8 +64,13 @@ const struct ZoneInfo {
reinterpret_cast<char*>(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<char*>(America_Los_Angeles), America_Los_Angeles_len},
+#else
{"/etc/localtime", //
reinterpret_cast<char*>(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 69763437..b0ebf6ee 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 f1e432d1..96b09521 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 73d05199..dd30db70 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",
+ ],
)