]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 11 Sep 2024 15:38:36 +0000 (09:38 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 12 Sep 2024 16:37:44 +0000 (10:37 -0600)
tests/base/smart_pointer_02.cc [new file with mode: 0644]
tests/base/smart_pointer_02.run_only [new file with mode: 0644]

diff --git a/tests/base/smart_pointer_02.cc b/tests/base/smart_pointer_02.cc
new file mode 100644 (file)
index 0000000..da5af3a
--- /dev/null
@@ -0,0 +1,41 @@
+// ------------------------------------------------------------------------
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+// Copyright (C) 2024 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// Part of the source code is dual licensed under Apache-2.0 WITH
+// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
+// governing the source code and code contributions can be found in
+// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
+//
+// ------------------------------------------------------------------------
+
+
+
+// Ensure that the old SmartPointer class name continues to be
+// available after the renaming to ObserverPointer.
+
+
+#include <deal.II/base/observer_pointer.h>
+#include <deal.II/base/smartpointer.h>
+#include <deal.II/base/subscriptor.h>
+
+#include <any>
+#include <iostream>
+
+#include "../tests.h"
+
+
+class Test : public Subscriptor
+{};
+
+
+int
+main()
+{
+  static_assert(std::is_same_v<ObserverPointer<Test>, SmartPointer<Test>>);
+  static_assert(
+    std::is_same_v<ObserverPointer<Test, int>, SmartPointer<Test, int>>);
+}
diff --git a/tests/base/smart_pointer_02.run_only b/tests/base/smart_pointer_02.run_only
new file mode 100644 (file)
index 0000000..e69de29

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.