From 4fab6213c479b5494e770c61c0ebd6b0234f21e2 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 10 Oct 2009 16:47:22 +0000 Subject: [PATCH] New test. git-svn-id: https://svn.dealii.org/trunk@19801 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/index_set_05.cc | 57 +++++++++++++++++++++++++++++ tests/base/index_set_05/cmp/generic | 12 ++++++ 2 files changed, 69 insertions(+) create mode 100644 tests/base/index_set_05.cc create mode 100644 tests/base/index_set_05/cmp/generic diff --git a/tests/base/index_set_05.cc b/tests/base/index_set_05.cc new file mode 100644 index 0000000000..7557a9c436 --- /dev/null +++ b/tests/base/index_set_05.cc @@ -0,0 +1,57 @@ +//----------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2009 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//----------------------------------------------------------------------------- + +// test IndexSet::is_contiguous and compress() + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +void test () +{ + IndexSet index_set (10); + index_set.add_index (2); + index_set.add_index (3); + index_set.add_index (4); + + index_set.compress (); + + index_set.add_index (5); + + + deallog << (index_set.is_contiguous() ? "true" : "false") + << std::endl; + Assert (index_set.is_contiguous() == true, ExcInternalError()); + + for (unsigned int i=0; i