[libcxx-commits] [PATCH] D154728: [libc++] Add some tests for std::bit_cast using pointers
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 7 14:15:12 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1c834112f27a: [libc++] Add some tests for std::bit_cast using pointers (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154728/new/
https://reviews.llvm.org/D154728
Files:
libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
Index: libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
===================================================================
--- libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
+++ libcxx/test/std/numerics/bit/bit.cast/bit_cast.pass.cpp
@@ -239,6 +239,28 @@
#endif
}
+ // Test pointers
+ {
+ {
+ int obj = 3;
+ void* p = &obj;
+ test_roundtrip_through_nested_T(p);
+ test_roundtrip_through_buffer(p);
+ test_roundtrip_through<void*>(p);
+ test_roundtrip_through<char*>(p);
+ test_roundtrip_through<int*>(p);
+ }
+ {
+ int obj = 3;
+ int* p = &obj;
+ test_roundtrip_through_nested_T(p);
+ test_roundtrip_through_buffer(p);
+ test_roundtrip_through<int*>(p);
+ test_roundtrip_through<char*>(p);
+ test_roundtrip_through<void*>(p);
+ }
+ }
+
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154728.538265.patch
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230707/669770a8/attachment-0001.bin>
More information about the libcxx-commits
mailing list