diff options
author | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-12-01 10:05:10 -0800 |
commit | 92a7e778e7394386f413cec28d67a07630f784b1 (patch) | |
tree | cb5673c7c09b0d3905b48a24765d07e423bc5b30 /src/google/protobuf/map_test.cc | |
parent | ce0a53273a400369932ba788d17500336a6ecaad (diff) | |
download | protobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.gz protobuf-92a7e778e7394386f413cec28d67a07630f784b1.tar.bz2 protobuf-92a7e778e7394386f413cec28d67a07630f784b1.zip |
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/map_test.cc')
-rw-r--r-- | src/google/protobuf/map_test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/map_test.cc b/src/google/protobuf/map_test.cc index 080c71a7..d59f92d2 100644 --- a/src/google/protobuf/map_test.cc +++ b/src/google/protobuf/map_test.cc @@ -676,6 +676,16 @@ TEST_F(MapImplTest, InsertByIterator) { ExpectElements(map1); } +#if LANG_CXX11 +TEST_F(MapImplTest, InsertByInitializerList) { + map_.insert({{1, 100}, {2, 200}}); + ExpectElements({{1, 100}, {2, 200}}); + + map_.insert({{2, 201}, {3, 301}}); + ExpectElements({{1, 100}, {2, 200}, {3, 301}}); +} +#endif + TEST_F(MapImplTest, EraseSingleByKey) { int32 key = 0; int32 value = 100; |