Skip to content

Commit

Permalink
Update libcxx11 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Nov 13, 2024
1 parent df28c7a commit b7265f1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ void main()

{
const PC arr[] = { {1,1L}, {2,2L}, {1,1L}, {INT_MAX,1L}, {3,1L} };
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<int>>);
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<int>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
const PC arr[] = { {1,1L}, {2,2L}, {1,1L}, {INT_MAX,1L}, {3,1L} };
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
const PC arr[] = { {1,1L}, {2,2L}, {1,1L}, {INT_MAX,1L}, {3,1L} };
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 41));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 41));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 41);
}
Expand All @@ -124,20 +124,20 @@ void main()
}

{
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>>);
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<>>);
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 44));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 44));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 44);
}
Expand All @@ -152,8 +152,8 @@ void main()

{
const PC arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<PC>(0, 46));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
momo::stdish::unordered_map m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<PC>(0, 46));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 46);
}
Expand All @@ -166,8 +166,8 @@ void main()
}

{
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), test_allocator<PC>(0, 48));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
momo::stdish::unordered_map m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), test_allocator<PC>(0, 48));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_map<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 48);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,22 @@ void main()

{
const PC arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<short>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<int>>);
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<long long>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<int>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
const PC arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<>>);
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
const PC arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 41));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 41));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 41);
}
Expand All @@ -125,20 +125,20 @@ void main()
}

{
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>>);
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<>>);
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), std::equal_to<>());
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
}

{
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), std::equal_to<>(), test_allocator<PC>(0, 44));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<>, test_allocator<PC>>);
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), std::equal_to<>(), test_allocator<PC>(0, 44));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 44);
}
Expand All @@ -153,8 +153,8 @@ void main()

{
const PC arr[] = { {1,1}, {2,2}, {1,1}, {INT_MAX,1}, {3,1} };
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<short>(), test_allocator<PC>(0, 46));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
momo::stdish::unordered_multimap m(std::begin(arr), std::end(arr), 42, std::hash<long long>(), test_allocator<PC>(0, 46));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 46);
}
Expand All @@ -167,8 +167,8 @@ void main()
}

{
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<short>(), test_allocator<PC>(0, 48));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<short>, std::equal_to<int>, test_allocator<PC>>);
momo::stdish::unordered_multimap m({ PC{1,1L}, PC{2,2L}, PC{1,1L}, PC{INT_MAX,1L}, PC{3,1L} }, 42, std::hash<long long>(), test_allocator<PC>(0, 48));
ASSERT_SAME_TYPE(decltype(m), momo::stdish::unordered_multimap<int, long, std::hash<long long>, std::equal_to<int>, test_allocator<PC>>);
assert(std::is_permutation(m.begin(), m.end(), std::begin(expected_m), std::end(expected_m)));
assert(m.get_allocator().get_id() == 48);
}
Expand Down

0 comments on commit b7265f1

Please sign in to comment.