From: Wolfgang Bangerth Date: Mon, 19 Dec 2016 23:05:43 +0000 (-0700) Subject: Add test. X-Git-Tag: v8.5.0-rc1~326^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3682%2Fhead;p=dealii.git Add test. --- 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