From 87640fb971da18ce3bbdd6ec1d628e5fb9d7af8e Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 10 Oct 2009 01:45:32 +0000 Subject: [PATCH] More tests. git-svn-id: https://svn.dealii.org/trunk@19796 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/index_set_01.cc | 2 +- tests/base/index_set_02.cc | 60 +++++++++++++++++++ tests/base/index_set_02/cmp/generic | 21 +++++++ .../cmp/powerpc-apple-darwin8.10.0+gcc4.0 | 9 +++ .../cmp/powerpc-apple-darwin8.8.0+gcc4.0 | 9 +++ 5 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 tests/base/index_set_02.cc create mode 100644 tests/base/index_set_02/cmp/generic create mode 100644 tests/base/index_set_02/cmp/powerpc-apple-darwin8.10.0+gcc4.0 create mode 100644 tests/base/index_set_02/cmp/powerpc-apple-darwin8.8.0+gcc4.0 diff --git a/tests/base/index_set_01.cc b/tests/base/index_set_01.cc index afb74844dd..522637e27f 100644 --- a/tests/base/index_set_01.cc +++ b/tests/base/index_set_01.cc @@ -11,7 +11,7 @@ // //----------------------------------------------------------------------------- -// test functions in namespace Utilities +// test IndexSet::is_element #include "../tests.h" #include diff --git a/tests/base/index_set_02.cc b/tests/base/index_set_02.cc new file mode 100644 index 0000000000..86d1708e70 --- /dev/null +++ b/tests/base/index_set_02.cc @@ -0,0 +1,60 @@ +//----------------------------------------------------------------------------- +// $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); + deallog << (index_set.is_contiguous() ? "true" : "false") + << std::endl; + Assert (index_set.is_contiguous() == true, ExcInternalError()); + + for (unsigned int i=0; i