From 7cfbabcb8400bdc6e6b14681f8b51ea151c427d1 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Thu, 16 May 2019 15:56:26 +0000 Subject: [PATCH] Improve the test coverage for std::is_base_of git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@360911 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../utilities/meta/meta.rel/is_base_of.pass.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp b/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp index ec27581a4..b50cf57ed 100644 --- a/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp +++ b/test/std/utilities/meta/meta.rel/is_base_of.pass.cpp @@ -39,6 +39,7 @@ struct B {}; struct B1 : B {}; struct B2 : B {}; struct D : private B1, private B2 {}; +struct I0; // incomplete int main(int, char**) { @@ -54,5 +55,19 @@ int main(int, char**) test_is_not_base_of(); test_is_not_base_of(); +// A scalar is never the base class of anything (including incomplete types) + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + +// A scalar never has base classes (including incomplete types) + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + test_is_not_base_of(); + return 0; }