From d516e36bc2d65ee33b280c4b6048f732ee1d3565 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 10 Oct 2009 01:55:18 +0000 Subject: [PATCH] More tests. git-svn-id: https://svn.dealii.org/trunk@19797 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/index_set_02/cmp/generic | 21 ------- tests/base/index_set_03.cc | 55 +++++++++++++++++++ tests/base/index_set_03/cmp/generic | 12 ++++ .../cmp/powerpc-apple-darwin8.10.0+gcc4.0 | 9 +++ .../cmp/powerpc-apple-darwin8.8.0+gcc4.0 | 9 +++ 5 files changed, 85 insertions(+), 21 deletions(-) create mode 100644 tests/base/index_set_03.cc create mode 100644 tests/base/index_set_03/cmp/generic create mode 100644 tests/base/index_set_03/cmp/powerpc-apple-darwin8.10.0+gcc4.0 create mode 100644 tests/base/index_set_03/cmp/powerpc-apple-darwin8.8.0+gcc4.0 diff --git a/tests/base/index_set_02/cmp/generic b/tests/base/index_set_02/cmp/generic index 00d6009e0f..e69de29bb2 100644 --- a/tests/base/index_set_02/cmp/generic +++ b/tests/base/index_set_02/cmp/generic @@ -1,21 +0,0 @@ - -DEAL::0 false -DEAL::1 false -DEAL::2 true -DEAL::3 true -DEAL::4 false -DEAL::5 false -DEAL::6 true -DEAL::7 false -DEAL::8 true -DEAL::9 false -DEAL::10 false -DEAL::11 false -DEAL::12 true -DEAL::13 true -DEAL::14 true -DEAL::15 true -DEAL::16 true -DEAL::17 true -DEAL::18 false -DEAL::19 false diff --git a/tests/base/index_set_03.cc b/tests/base/index_set_03.cc new file mode 100644 index 0000000000..a5f7a92afa --- /dev/null +++ b/tests/base/index_set_03.cc @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// $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.add_index (6); + index_set.add_index (7); + + deallog << (index_set.is_contiguous() ? "true" : "false") + << std::endl; + Assert (index_set.is_contiguous() == false, ExcInternalError()); + + for (unsigned int i=0; i