From fa421ad7054381a6d5eeb254caeab04a1f898693 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 19 Dec 2016 16:05:43 -0700 Subject: [PATCH] Add test. --- tests/base/index_set_27.cc | 36 ++++++++++++++++++++++++++++++++++ tests/base/index_set_27.output | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 tests/base/index_set_27.cc create mode 100644 tests/base/index_set_27.output diff --git a/tests/base/index_set_27.cc b/tests/base/index_set_27.cc new file mode 100644 index 0000000000..5733cf123c --- /dev/null +++ b/tests/base/index_set_27.cc @@ -0,0 +1,36 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +// Check that pop_back() for `IndexSet` works properly + +#include "../tests.h" +#include + +#include +#include + +int main() +{ + std::ofstream logfile("output"); + deallog.attach(logfile); + + const unsigned int size = 100; + + IndexSet locally_owned(size); + locally_owned.add_range(0,size); + + deallog << locally_owned.nth_index_in_set(5) + << std::endl; +} diff --git a/tests/base/index_set_27.output b/tests/base/index_set_27.output new file mode 100644 index 0000000000..d77698b7f8 --- /dev/null +++ b/tests/base/index_set_27.output @@ -0,0 +1,2 @@ + +DEAL::5 -- 2.39.5