@@ -33,19 +33,19 @@ using PC = std::pair<const int, long>;
3333
3434void test_copy () {
3535 {
36- std::flat_map<long , short > source = {{1 , 2 }, {2 , 3 }};
36+ std::flat_map<long , int > source = {{1 , 2 }, {2 , 3 }};
3737 std::flat_map s (source);
3838 ASSERT_SAME_TYPE (decltype (s), decltype (source));
3939 assert (s == source);
4040 }
4141 {
42- std::flat_map<long , short , std::greater<long >> source = {{1 , 2 }, {2 , 3 }};
42+ std::flat_map<long , int , std::greater<long >> source = {{1 , 2 }, {2 , 3 }};
4343 std::flat_map s{source}; // braces instead of parens
4444 ASSERT_SAME_TYPE (decltype (s), decltype (source));
4545 assert (s == source);
4646 }
4747 {
48- std::flat_map<long , short , std::greater<long >> source = {{1 , 2 }, {2 , 3 }};
48+ std::flat_map<long , int , std::greater<long >> source = {{1 , 2 }, {2 , 3 }};
4949 std::flat_map s (source, std::allocator<int >());
5050 ASSERT_SAME_TYPE (decltype (s), decltype (source));
5151 assert (s == source);
@@ -54,38 +54,38 @@ void test_copy() {
5454
5555void test_containers () {
5656 std::deque<int , test_allocator<int >> ks ({1 , 2 , 1 , INT_MAX, 3 }, test_allocator<int >(0 , 42 ));
57- std::deque<short , test_allocator<short >> vs ({1 , 2 , 1 , 4 , 5 }, test_allocator<int >(0 , 43 ));
57+ std::deque<long , test_allocator<long >> vs ({1 , 2 , 1 , 4 , 5 }, test_allocator<int >(0 , 43 ));
5858 std::deque<int , test_allocator<int >> sorted_ks ({1 , 2 , 3 , INT_MAX}, test_allocator<int >(0 , 42 ));
59- std::deque<short , test_allocator<short >> sorted_vs ({1 , 2 , 5 , 4 }, test_allocator<int >(0 , 43 ));
60- const std::pair<int , short > expected[] = {{1 , 1 }, {2 , 2 }, {3 , 5 }, {INT_MAX, 4 }};
59+ std::deque<long , test_allocator<long >> sorted_vs ({1 , 2 , 5 , 4 }, test_allocator<int >(0 , 43 ));
60+ const std::pair<int , long > expected[] = {{1 , 1 }, {2 , 2 }, {3 , 5 }, {INT_MAX, 4 }};
6161 {
6262 std::flat_map s (ks, vs);
6363
64- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::less<int >, decltype (ks), decltype (vs)>);
64+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::less<int >, decltype (ks), decltype (vs)>);
6565 assert (std::ranges::equal (s, expected));
6666 assert (s.keys ().get_allocator ().get_id () == 42 );
6767 assert (s.values ().get_allocator ().get_id () == 43 );
6868 }
6969 {
7070 std::flat_map s (std::sorted_unique, sorted_ks, sorted_vs);
7171
72- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::less<int >, decltype (ks), decltype (vs)>);
72+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::less<int >, decltype (ks), decltype (vs)>);
7373 assert (std::ranges::equal (s, expected));
7474 assert (s.keys ().get_allocator ().get_id () == 42 );
7575 assert (s.values ().get_allocator ().get_id () == 43 );
7676 }
7777 {
7878 std::flat_map s (ks, vs, test_allocator<long >(0 , 44 ));
7979
80- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::less<int >, decltype (ks), decltype (vs)>);
80+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::less<int >, decltype (ks), decltype (vs)>);
8181 assert (std::ranges::equal (s, expected));
8282 assert (s.keys ().get_allocator ().get_id () == 44 );
8383 assert (s.values ().get_allocator ().get_id () == 44 );
8484 }
8585 {
8686 std::flat_map s (std::sorted_unique, sorted_ks, sorted_vs, test_allocator<long >(0 , 44 ));
8787
88- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::less<int >, decltype (ks), decltype (vs)>);
88+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::less<int >, decltype (ks), decltype (vs)>);
8989 assert (std::ranges::equal (s, expected));
9090 assert (s.keys ().get_allocator ().get_id () == 44 );
9191 assert (s.values ().get_allocator ().get_id () == 44 );
@@ -94,38 +94,38 @@ void test_containers() {
9494
9595void test_containers_compare () {
9696 std::deque<int , test_allocator<int >> ks ({1 , 2 , 1 , INT_MAX, 3 }, test_allocator<int >(0 , 42 ));
97- std::deque<short , test_allocator<short >> vs ({1 , 2 , 1 , 4 , 5 }, test_allocator<int >(0 , 43 ));
97+ std::deque<long , test_allocator<long >> vs ({1 , 2 , 1 , 4 , 5 }, test_allocator<int >(0 , 43 ));
9898 std::deque<int , test_allocator<int >> sorted_ks ({INT_MAX, 3 , 2 , 1 }, test_allocator<int >(0 , 42 ));
99- std::deque<short , test_allocator<short >> sorted_vs ({4 , 5 , 2 , 1 }, test_allocator<int >(0 , 43 ));
100- const std::pair<int , short > expected[] = {{INT_MAX, 4 }, {3 , 5 }, {2 , 2 }, {1 , 1 }};
99+ std::deque<long , test_allocator<long >> sorted_vs ({4 , 5 , 2 , 1 }, test_allocator<int >(0 , 43 ));
100+ const std::pair<int , long > expected[] = {{INT_MAX, 4 }, {3 , 5 }, {2 , 2 }, {1 , 1 }};
101101 {
102102 std::flat_map s (ks, vs, std::greater<int >());
103103
104- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::greater<int >, decltype (ks), decltype (vs)>);
104+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::greater<int >, decltype (ks), decltype (vs)>);
105105 assert (std::ranges::equal (s, expected));
106106 assert (s.keys ().get_allocator ().get_id () == 42 );
107107 assert (s.values ().get_allocator ().get_id () == 43 );
108108 }
109109 {
110110 std::flat_map s (std::sorted_unique, sorted_ks, sorted_vs, std::greater<int >());
111111
112- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::greater<int >, decltype (ks), decltype (vs)>);
112+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::greater<int >, decltype (ks), decltype (vs)>);
113113 assert (std::ranges::equal (s, expected));
114114 assert (s.keys ().get_allocator ().get_id () == 42 );
115115 assert (s.values ().get_allocator ().get_id () == 43 );
116116 }
117117 {
118118 std::flat_map s (ks, vs, std::greater<int >(), test_allocator<long >(0 , 44 ));
119119
120- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::greater<int >, decltype (ks), decltype (vs)>);
120+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::greater<int >, decltype (ks), decltype (vs)>);
121121 assert (std::ranges::equal (s, expected));
122122 assert (s.keys ().get_allocator ().get_id () == 44 );
123123 assert (s.values ().get_allocator ().get_id () == 44 );
124124 }
125125 {
126126 std::flat_map s (std::sorted_unique, sorted_ks, sorted_vs, std::greater<int >(), test_allocator<long >(0 , 44 ));
127127
128- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::greater<int >, decltype (ks), decltype (vs)>);
128+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::greater<int >, decltype (ks), decltype (vs)>);
129129 assert (std::ranges::equal (s, expected));
130130 assert (s.keys ().get_allocator ().get_id () == 44 );
131131 assert (s.values ().get_allocator ().get_id () == 44 );
@@ -280,45 +280,45 @@ void test_initializer_list_compare() {
280280}
281281
282282void test_from_range () {
283- std::list<std::pair<int , short >> r = {{1 , 1 }, {2 , 2 }, {1 , 1 }, {INT_MAX, 4 }, {3 , 5 }};
284- const std::pair<int , short > expected[] = {{1 , 1 }, {2 , 2 }, {3 , 5 }, {INT_MAX, 4 }};
283+ std::list<std::pair<int , long >> r = {{1 , 1 }, {2 , 2 }, {1 , 1 }, {INT_MAX, 4 }, {3 , 5 }};
284+ const std::pair<int , long > expected[] = {{1 , 1 }, {2 , 2 }, {3 , 5 }, {INT_MAX, 4 }};
285285 {
286286 std::flat_map s (std::from_range, r);
287- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::less<int >>);
287+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::less<int >>);
288288 assert (std::ranges::equal (s, expected));
289289 }
290290 {
291291 std::flat_map s (std::from_range, r, test_allocator<long >(0 , 42 ));
292292 ASSERT_SAME_TYPE (
293293 decltype (s),
294294 std::flat_map<int ,
295- short ,
295+ long ,
296296 std::less<int >,
297297 std::vector<int , test_allocator<int >>,
298- std::vector<short , test_allocator<short >>>);
298+ std::vector<long , test_allocator<long >>>);
299299 assert (std::ranges::equal (s, expected));
300300 assert (s.keys ().get_allocator ().get_id () == 42 );
301301 assert (s.values ().get_allocator ().get_id () == 42 );
302302 }
303303}
304304
305305void test_from_range_compare () {
306- std::list<std::pair<int , short >> r = {{1 , 1 }, {2 , 2 }, {1 , 1 }, {INT_MAX, 4 }, {3 , 5 }};
307- const std::pair<int , short > expected[] = {{INT_MAX, 4 }, {3 , 5 }, {2 , 2 }, {1 , 1 }};
306+ std::list<std::pair<int , long >> r = {{1 , 1 }, {2 , 2 }, {1 , 1 }, {INT_MAX, 4 }, {3 , 5 }};
307+ const std::pair<int , long > expected[] = {{INT_MAX, 4 }, {3 , 5 }, {2 , 2 }, {1 , 1 }};
308308 {
309309 std::flat_map s (std::from_range, r, std::greater<int >());
310- ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , short , std::greater<int >>);
310+ ASSERT_SAME_TYPE (decltype (s), std::flat_map<int , long , std::greater<int >>);
311311 assert (std::ranges::equal (s, expected));
312312 }
313313 {
314314 std::flat_map s (std::from_range, r, std::greater<int >(), test_allocator<long >(0 , 42 ));
315315 ASSERT_SAME_TYPE (
316316 decltype (s),
317317 std::flat_map<int ,
318- short ,
318+ long ,
319319 std::greater<int >,
320320 std::vector<int , test_allocator<int >>,
321- std::vector<short , test_allocator<short >>>);
321+ std::vector<long , test_allocator<long >>>);
322322 assert (std::ranges::equal (s, expected));
323323 assert (s.keys ().get_allocator ().get_id () == 42 );
324324 assert (s.values ().get_allocator ().get_id () == 42 );
0 commit comments