X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Flibc%2B%2B%2Ftrunk%2Ftest%2Futilities%2Fmeta%2Fmeta.unary%2Fmeta.unary.prop%2Fis_destructible.pass.cpp;h=807745ef66c16a2401dc570a764784e69db9ab95;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=5cabb381db5a68895e04809c4cea7c602102eced;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/libc++/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/src/third_party/libc++/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp index 5cabb38..807745e 100644 --- a/src/third_party/libc++/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp +++ b/src/third_party/libc++/trunk/test/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp @@ -31,9 +31,7 @@ void test_is_not_destructible() static_assert(!std::is_destructible::value, ""); } -class Empty -{ -}; +class Empty {}; class NotEmpty { @@ -47,11 +45,6 @@ struct bit_zero int : 0; }; -class Abstract -{ - virtual ~Abstract() = 0; -}; - struct A { ~A(); @@ -59,6 +52,31 @@ struct A typedef void (Function) (); +struct PublicAbstract { public: virtual void foo() = 0; }; +struct ProtectedAbstract { protected: virtual void foo() = 0; }; +struct PrivateAbstract { private: virtual void foo() = 0; }; + +struct PublicDestructor { public: ~PublicDestructor() {}}; +struct ProtectedDestructor { protected: ~ProtectedDestructor() {}}; +struct PrivateDestructor { private: ~PrivateDestructor() {}}; + +struct VirtualPublicDestructor { public: virtual ~VirtualPublicDestructor() {}}; +struct VirtualProtectedDestructor { protected: virtual ~VirtualProtectedDestructor() {}}; +struct VirtualPrivateDestructor { private: virtual ~VirtualPrivateDestructor() {}}; + +struct PurePublicDestructor { public: virtual ~PurePublicDestructor() = 0; }; +struct PureProtectedDestructor { protected: virtual ~PureProtectedDestructor() = 0; }; +struct PurePrivateDestructor { private: virtual ~PurePrivateDestructor() = 0; }; + +struct DeletedPublicDestructor { public: ~DeletedPublicDestructor() = delete; }; +struct DeletedProtectedDestructor { protected: ~DeletedProtectedDestructor() = delete; }; +struct DeletedPrivateDestructor { private: ~DeletedPrivateDestructor() = delete; }; + +struct DeletedVirtualPublicDestructor { public: virtual ~DeletedVirtualPublicDestructor() = delete; }; +struct DeletedVirtualProtectedDestructor { protected: virtual ~DeletedVirtualProtectedDestructor() = delete; }; +struct DeletedVirtualPrivateDestructor { private: virtual ~DeletedVirtualPrivateDestructor() = delete; }; + + int main() { test_is_destructible(); @@ -72,10 +90,30 @@ int main() test_is_destructible(); test_is_destructible(); test_is_destructible(); + test_is_destructible(); + test_is_destructible(); + test_is_destructible(); + test_is_destructible(); + test_is_destructible(); + test_is_destructible(); test_is_not_destructible(); test_is_not_destructible(); - test_is_not_destructible(); + + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + test_is_not_destructible(); + +// test_is_not_destructible(); // currently fails due to clang bug #20268 + test_is_not_destructible(); + test_is_not_destructible(); + #if __has_feature(cxx_access_control_sfinae) test_is_not_destructible(); #endif