From 5340acf59d37ff976f93393ebcbd9c939cddb4f9 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 2 Jun 2004 14:54:53 +0000 Subject: [PATCH] New tests. git-svn-id: https://svn.dealii.org/trunk@9359 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/block_vector_vector_01.cc | 75 ++++++++++++++++++++++++++++ tests/bits/vector_vector_01.cc | 74 +++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 tests/bits/block_vector_vector_01.cc create mode 100644 tests/bits/vector_vector_01.cc diff --git a/tests/bits/block_vector_vector_01.cc b/tests/bits/block_vector_vector_01.cc new file mode 100644 index 0000000000..a44519c68a --- /dev/null +++ b/tests/bits/block_vector_vector_01.cc @@ -0,0 +1,75 @@ +//---------------------------- block_vector_vector_01.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. +// +//---------------------------- block_vector_vector_01.cc --------------------------- + + +// check existence of +// BlockVector::BlockVector(BlockVector). this conversion +// constructor was disabled previously altogether because of a compiler defect +// that did not honor the 'explicit' keyword on template constructors. this is +// now autoconf'ed. + +#include "../tests.h" +#include +#include +#include + + +void test (Vector &v) +{ + for (unsigned int i=0; i w(v); + + Assert (w==v, ExcInternalError()); + + deallog << "OK" << std::endl; +} + + + +int main () +{ + std::ofstream logfile("block_vector_vector_01.output"); + deallog.attach(logfile); + deallog.depth_console(0); + + try + { + Vector 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/bits/vector_vector_01.cc b/tests/bits/vector_vector_01.cc new file mode 100644 index 0000000000..0bb8471d80 --- /dev/null +++ b/tests/bits/vector_vector_01.cc @@ -0,0 +1,74 @@ +//---------------------------- vector_vector_01.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_vector_01.cc --------------------------- + + +// check existence Vector::Vector(Vector). this conversion +// constructor was disabled previously altogether because of a compiler defect +// that did not honor the 'explicit' keyword on template constructors. this is +// now autoconf'ed. + +#include "../tests.h" +#include +#include +#include + + +void test (Vector &v) +{ + for (unsigned int i=0; i w(v); + + Assert (w==v, ExcInternalError()); + + deallog << "OK" << std::endl; +} + + + +int main () +{ + std::ofstream logfile("vector_vector_01.output"); + deallog.attach(logfile); + deallog.depth_console(0); + + try + { + Vector 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; + }; +} -- 2.39.5