[libcxx-commits] [PATCH] D149696: [libc++] Add missing test for std::hash<std::filesystem::path>
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 2 14:51:12 PDT 2023
ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149696
Files:
libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03
+
+// <filesystem>
+
+// Test that <filesystem> provides all of the arithmetic, enum, and pointer
+// hash specializations.
+
+#include <filesystem>
+
+#include "poisoned_hash_helper.h"
+
+int main(int, char**) {
+ test_library_hash_specializations_available();
+ test_hash_enabled_for_type<std::filesystem::path>();
+
+ return 0;
+}
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
@@ -25,6 +25,7 @@
// strong_ordering operator<=>(path const&, path const&) noexcept;
//
// size_t hash_value(path const&) noexcept;
+// template<> struct hash<filesystem::path>;
#include "filesystem_include.h"
#include <type_traits>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149696.518865.patch
Type: text/x-patch
Size: 1611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230502/f329df10/attachment.bin>
More information about the libcxx-commits
mailing list