From 82743a5f6407b568d750ad100cc400212cf3bd1f Mon Sep 17 00:00:00 2001 From: wolf Date: Sun, 29 Feb 2004 20:52:15 +0000 Subject: [PATCH] New test. git-svn-id: https://svn.dealii.org/trunk@8621 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/vector_57.cc | 86 +++++++++++++++++++ .../bits/vector_57.output | 2 + 2 files changed, 88 insertions(+) create mode 100644 tests/bits/vector_57.cc create mode 100644 tests/results/i686-pc-linux-gnu+gcc3.2/bits/vector_57.output diff --git a/tests/bits/vector_57.cc b/tests/bits/vector_57.cc new file mode 100644 index 0000000000..821ecdef89 --- /dev/null +++ b/tests/bits/vector_57.cc @@ -0,0 +1,86 @@ +//---------------------------- vector_57.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2004 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. +// +//---------------------------- vector_57.cc --------------------------- + + +// check Vector::is_non_zero + +#include "../tests.h" +#include +#include +#include +#include + + +void test (Vector &v) +{ + // set only certain elements of the + // vector. they are all positive + std::vector pattern (v.size(), false); + for (unsigned int i=0; i v (100); + test (v); + } + catch (std::exception &exc) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + + return 1; + } + catch (...) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + }; +} diff --git a/tests/results/i686-pc-linux-gnu+gcc3.2/bits/vector_57.output b/tests/results/i686-pc-linux-gnu+gcc3.2/bits/vector_57.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/results/i686-pc-linux-gnu+gcc3.2/bits/vector_57.output @@ -0,0 +1,2 @@ + +DEAL::OK -- 2.39.5