From 5ba050d25e84bcd094a9e5a4d96c3e00ad9105c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 15 Oct 2009 20:21:17 +0000 Subject: [PATCH] New test. git-svn-id: https://svn.dealii.org/trunk@19889 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/index_set_11.cc | 71 +++++++++++++++++++++++++++++ tests/base/index_set_11/cmp/generic | 22 +++++++++ 2 files changed, 93 insertions(+) create mode 100644 tests/base/index_set_11.cc create mode 100644 tests/base/index_set_11/cmp/generic diff --git a/tests/base/index_set_11.cc b/tests/base/index_set_11.cc new file mode 100644 index 0000000000..2f545d5f4c --- /dev/null +++ b/tests/base/index_set_11.cc @@ -0,0 +1,71 @@ +//----------------------------------------------------------------------------- +// $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::add_indices + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +void test () +{ + IndexSet index_set (10); + + { + const unsigned int array[] = { 2, 3, 4 }; + index_set.add_indices ((const unsigned int*)array, array+sizeof(array)/sizeof(array[0])); + } + { + const unsigned int array[] = { 7,6 }; + index_set.add_indices ((const unsigned int*)array, array+sizeof(array)/sizeof(array[0])); + } + + Assert (index_set.is_contiguous() == false, ExcInternalError()); + + for (unsigned int i=0; i