Skip to content

Commit

Permalink
Export of internal Abseil changes
Browse files Browse the repository at this point in the history
--
1639d4832e961761060e61196e45948e25dc2676 by Derek Mauro <dmauro@google.com>:

Delete GCC 4.8 test script. GCC 4.8 is no longer supported.

PiperOrigin-RevId: 264485899

--
2a9b2182646b6c6675dce614dcce2c18174303d3 by Derek Mauro <dmauro@google.com>:

Make btree_test work with exceptions both enabled and disabled

PiperOrigin-RevId: 264473656
GitOrigin-RevId: 1639d4832e961761060e61196e45948e25dc2676
Change-Id: Ica58a2328fa261ecc4c4be410f68f97942074025
  • Loading branch information
Abseil Team authored and Xiaoyi Zhang committed Aug 21, 2019
1 parent f0afae0 commit 262d74b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 67 deletions.
1 change: 1 addition & 0 deletions absl/container/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ cc_test(
":btree_test_common",
":counting_allocator",
":test_instance_tracker",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
"//absl/flags:flag",
"//absl/hash:hash_testing",
Expand Down
1 change: 1 addition & 0 deletions absl/container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ absl_cc_test(
absl::btree
absl::btree_test_common
absl::compare
absl::core_headers
absl::counting_allocator
absl::flags
absl::hash_testing
Expand Down
12 changes: 6 additions & 6 deletions absl/container/btree_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/macros.h"
#include "absl/container/btree_map.h"
#include "absl/container/btree_set.h"
#include "absl/container/internal/counting_allocator.h"
Expand Down Expand Up @@ -1537,12 +1538,11 @@ TEST(Btree, MapAt) {
const absl::btree_map<int, int> &const_map = map;
EXPECT_EQ(const_map.at(1), 2);
EXPECT_EQ(const_map.at(2), 8);
try {
map.at(3);
FAIL() << "Exception not thrown";
} catch (const std::out_of_range& e) {
EXPECT_STREQ(e.what(), "absl::btree_map::at");
}
#ifdef ABSL_HAVE_EXCEPTIONS
EXPECT_THROW(map.at(3), std::out_of_range);
#else
EXPECT_DEATH(map.at(3), "absl::btree_map::at");
#endif
}

TEST(Btree, BtreeMultisetEmplace) {
Expand Down
61 changes: 0 additions & 61 deletions ci/linux_gcc-4.8_libstdcxx_cmake.sh

This file was deleted.

0 comments on commit 262d74b

Please sign in to comment.