From: Wolfgang Bangerth Date: Thu, 19 Dec 2024 12:16:32 +0000 (-0700) Subject: Remove tests that check no longer public interfaces. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17945%2Fhead;p=dealii.git Remove tests that check no longer public interfaces. --- diff --git a/tests/base/unsubscribe_subscriptor.cc b/tests/base/unsubscribe_subscriptor.cc deleted file mode 100644 index a454c4e14d..0000000000 --- a/tests/base/unsubscribe_subscriptor.cc +++ /dev/null @@ -1,49 +0,0 @@ -// ------------------------------------------------------------------------ -// -// SPDX-License-Identifier: LGPL-2.1-or-later -// Copyright (C) 2018 - 2023 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. -// -// ------------------------------------------------------------------------ - - - -// check that unsubscribing with a wrong id is handled correctly - - -#include -#include - -#include -#include - -#include "../tests.h" - -class Test : public EnableObserverPointer -{}; - -int -main() -{ - deal_II_exceptions::disable_abort_on_exception(); - - initlog(); - - EnableObserverPointer subscriptor; - std::atomic dummy_a; - const char *foo_a = "a"; - const char *foo_b = "b"; - subscriptor.subscribe(&dummy_a, foo_a); - subscriptor.unsubscribe(&dummy_a, foo_b); - std::atomic dummy_b; - subscriptor.unsubscribe(&dummy_b, foo_a); - subscriptor.unsubscribe(&dummy_a, foo_a); - - return 0; -} diff --git a/tests/base/unsubscribe_subscriptor.debug.output b/tests/base/unsubscribe_subscriptor.debug.output deleted file mode 100644 index 3afe48c72b..0000000000 --- a/tests/base/unsubscribe_subscriptor.debug.output +++ /dev/null @@ -1,26 +0,0 @@ - -DEAL::Exception: ExcNoSubscriber(object_info->name(), name) -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic*, const string&) const -The violated condition was: - it != counter_map.end() -Additional information: - No subscriber with identifier subscribes to this object of class - N6dealii21EnableObserverPointerE. Consequently, it cannot be - unsubscribed. --------------------------------------------------------- - -DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!") -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic*, const string&) const -The violated condition was: - validity_ptr_it != validity_pointers.end() -Additional information: - This EnableObserverPointer object does not know anything about the - supplied pointer! --------------------------------------------------------- - diff --git a/tests/base/unsubscribe_subscriptor.debug.output.clang-6 b/tests/base/unsubscribe_subscriptor.debug.output.clang-6 deleted file mode 100644 index 7644777cb6..0000000000 --- a/tests/base/unsubscribe_subscriptor.debug.output.clang-6 +++ /dev/null @@ -1,26 +0,0 @@ - -DEAL::Exception: ExcNoSubscriber(object_info->name(), name) -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic *const, const std::string &) const -The violated condition was: - it != counter_map.end() -Additional information: - No subscriber with identifier subscribes to this object of class - N6dealii21EnableObserverPointerE. Consequently, it cannot be - unsubscribed. --------------------------------------------------------- - -DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!") -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic *const, const std::string &) const -The violated condition was: - validity_ptr_it != validity_pointers.end() -Additional information: - This EnableObserverPointer object does not know anything about the - supplied pointer! --------------------------------------------------------- - diff --git a/tests/base/unsubscribe_subscriptor.debug.output.gcc-12 b/tests/base/unsubscribe_subscriptor.debug.output.gcc-12 deleted file mode 100644 index 6b6890a683..0000000000 --- a/tests/base/unsubscribe_subscriptor.debug.output.gcc-12 +++ /dev/null @@ -1,26 +0,0 @@ - -DEAL::Exception: ExcNoSubscriber(object_info->name(), name) -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic*, const std::string&) const -The violated condition was: - it != counter_map.end() -Additional information: - No subscriber with identifier subscribes to this object of class - N6dealii21EnableObserverPointerE. Consequently, it cannot be - unsubscribed. --------------------------------------------------------- - -DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!") -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic*, const std::string&) const -The violated condition was: - validity_ptr_it != validity_pointers.end() -Additional information: - This EnableObserverPointer object does not know anything about the - supplied pointer! --------------------------------------------------------- - diff --git a/tests/base/unsubscribe_subscriptor.debug.output.intel b/tests/base/unsubscribe_subscriptor.debug.output.intel deleted file mode 100644 index b2966668cf..0000000000 --- a/tests/base/unsubscribe_subscriptor.debug.output.intel +++ /dev/null @@ -1,26 +0,0 @@ - -DEAL::Exception: ExcNoSubscriber(object_info->name(), name) -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic *, const std::__cxx11::basic_string, std::allocator> &) const -The violated condition was: - it != counter_map.end() -Additional information: - No subscriber with identifier subscribes to this object of class - N6dealii21EnableObserverPointerE. Consequently, it cannot be - unsubscribed. --------------------------------------------------------- - -DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!") -DEAL:: --------------------------------------------------------- -An error occurred in file in function - void dealii::EnableObserverPointer::unsubscribe(std::atomic *, const std::__cxx11::basic_string, std::allocator> &) const -The violated condition was: - validity_ptr_it != validity_pointers.end() -Additional information: - This EnableObserverPointer object does not know anything about the - supplied pointer! --------------------------------------------------------- - diff --git a/tests/base/unsubscribe_subscriptor_01.cc b/tests/base/unsubscribe_subscriptor_01.cc deleted file mode 100644 index 3df6a2f77a..0000000000 --- a/tests/base/unsubscribe_subscriptor_01.cc +++ /dev/null @@ -1,55 +0,0 @@ -// ------------------------------------------------------------------------ -// -// SPDX-License-Identifier: LGPL-2.1-or-later -// Copyright (C) 2018 - 2023 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. -// -// ------------------------------------------------------------------------ - - - -// check that unsubscribing with a wrong id is handled correctly. This time, -// we check that unsubscribung with a different pointer with the same content -// works as well - - -#include -#include - -#include -#include - -#include "../tests.h" - -class Test : public EnableObserverPointer -{}; - -int -main() -{ - deal_II_exceptions::disable_abort_on_exception(); - - initlog(); - - EnableObserverPointer subscriptor; - std::atomic dummy_a; - const char *foo = "a"; - const std::string foo_string = "a"; - subscriptor.subscribe(&dummy_a, foo); - subscriptor.unsubscribe(&dummy_a, foo_string.c_str()); - - deallog << "OK" << std::endl; - - subscriptor.subscribe(&dummy_a, foo); - subscriptor.unsubscribe(&dummy_a, "a"); - - deallog << "OK" << std::endl; - - return 0; -} diff --git a/tests/base/unsubscribe_subscriptor_01.output b/tests/base/unsubscribe_subscriptor_01.output deleted file mode 100644 index 8b3b075900..0000000000 --- a/tests/base/unsubscribe_subscriptor_01.output +++ /dev/null @@ -1,3 +0,0 @@ - -DEAL::OK -DEAL::OK