[OpenACC] Fixup test to be more consistent
[llvm-project.git] / libcxx / test / std / utilities / memory / util.smartptr / util.smartptr.shared / util.smartptr.shared.const / default.pass.cpp
blob6ac7ad6447619e73ee7f4358e8bfa3808522cc60
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <memory>
11 // shared_ptr();
13 #include <memory>
14 #include <cassert>
16 #include "test_macros.h"
18 struct A {};
20 template <class T>
21 void test() {
22 std::shared_ptr<T> p;
23 assert(p.use_count() == 0);
24 assert(p.get() == 0);
27 int main(int, char**) {
28 test<int>();
29 test<int const>();
30 test<A>();
31 test<A const>();
32 test<int*>();
33 test<int const*>();
34 test<int[]>();
35 test<int[8]>();
37 return 0;