Chromium Code Reviews| Index: mojo/public/cpp/bindings/tests/map_unittest.cc |
| diff --git a/mojo/public/cpp/bindings/tests/map_unittest.cc b/mojo/public/cpp/bindings/tests/map_unittest.cc |
| index 159afb9578e0381da85f6ff5a811ca77398de8c9..f3884f7e78fae552e0404b7e93d0be6a9662e4a0 100644 |
| --- a/mojo/public/cpp/bindings/tests/map_unittest.cc |
| +++ b/mojo/public/cpp/bindings/tests/map_unittest.cc |
| @@ -50,6 +50,17 @@ TEST_F(MapTest, InsertWorks) { |
| } |
| } |
| +TEST_F(MapTest, TestIndexOperator) { |
| + Map<String, int> map; |
| + for (size_t i = 0; i < kStringIntDataSize; ++i) |
| + map[kStringIntData[i].string_data] = kStringIntData[i].int_data; |
|
viettrungluu
2014/10/15 23:54:06
Two things:
- maybe test map[foo] when used strict
|
| + |
| + for (size_t i = 0; i < kStringIntDataSize; ++i) { |
| + EXPECT_EQ(kStringIntData[i].int_data, |
| + map.at(kStringIntData[i].string_data)); |
| + } |
| +} |
| + |
| TEST_F(MapTest, ConstructedFromArray) { |
| Array<String> keys(kStringIntDataSize); |
| Array<int> values(kStringIntDataSize); |