From aabce594bdd70f2405d99ad1408564bd7b9301d8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 13 Oct 2009 21:36:41 +0000 Subject: [PATCH] New test. git-svn-id: https://svn.dealii.org/trunk@19853 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/index_set_10.cc | 66 +++++++++++++++++++++++++++++ tests/base/index_set_10/cmp/generic | 14 ++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/base/index_set_10.cc create mode 100644 tests/base/index_set_10/cmp/generic diff --git a/tests/base/index_set_10.cc b/tests/base/index_set_10.cc new file mode 100644 index 0000000000..7c41499cdc --- /dev/null +++ b/tests/base/index_set_10.cc @@ -0,0 +1,66 @@ +//----------------------------------------------------------------------------- +// $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 indexing in IndexSet variables + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +void test () +{ + IndexSet index_set (20); + + index_set.add_index (2); + index_set.add_index (3); + index_set.add_index (4); + + index_set.add_index (6); + index_set.add_index (7); + + index_set.compress (); + + index_set.add_index (5); + + for (unsigned int i=0; i