Skip to content

Commit

Permalink
Update libcxx/map
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Nov 26, 2023
1 parent 8cd5f70 commit 1be4ed9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/sources/libcxx/map/map.access/index_key.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ int main(int, char**)
m[i] = -1.5;
assert(m[1] == -1.5);
assert(m.size() == 7);
#ifndef MOMO_USE_SAFE_MAP_BRACKETS
assert(m[6] == 0);
assert(m.size() == 8);
#endif
m[6] = 6.5;
assert(m[6] == 6.5);
assert(m.size() == 8);
Expand Down Expand Up @@ -137,8 +139,10 @@ int main(int, char**)
m[1] = -1.5;
assert(m[1] == -1.5);
assert(m.size() == 7);
#ifndef MOMO_USE_SAFE_MAP_BRACKETS
assert(m[6] == 0);
assert(m.size() == 8);
#endif
m[6] = 6.5;
assert(m[6] == 6.5);
assert(m.size() == 8);
Expand Down
4 changes: 4 additions & 0 deletions test/sources/libcxx/map/map.access/index_rv_key.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ int main(int, char**)
typedef std::pair<const MoveOnly, double> V;
std::map<MoveOnly, double, std::less<MoveOnly>, min_allocator<V>> m;
assert(m.size() == 0);
#ifndef MOMO_USE_SAFE_MAP_BRACKETS
assert(m[1] == 0.0);
assert(m.size() == 1);
#endif
m[1] = -1.5;
assert(m[1] == -1.5);
assert(m.size() == 1);
#ifndef MOMO_USE_SAFE_MAP_BRACKETS
assert(m[6] == 0);
assert(m.size() == 2);
#endif
m[6] = 6.5;
assert(m[6] == 6.5);
assert(m.size() == 2);
Expand Down

0 comments on commit 1be4ed9

Please sign in to comment.