From: Matthias Maier Date: Sat, 20 Feb 2021 01:13:44 +0000 (-0600) Subject: add a test X-Git-Tag: v9.3.0-rc1~429^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6d1d73c1e9b1ae48d448f5229c224ea43c87046;p=dealii.git add a test --- diff --git a/tests/base/ndarray.cc b/tests/base/ndarray.cc new file mode 100644 index 0000000000..be4d074c66 --- /dev/null +++ b/tests/base/ndarray.cc @@ -0,0 +1,54 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2021 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + + +// test that the ndarray type alias does what it promises to do. + +#include + +#include + +#include "../tests.h" + +int +main() +{ + initlog(); + + dealii::ndarray r0; + dealii::ndarray r1; + dealii::ndarray r2; + dealii::ndarray r3; + dealii::ndarray r4; + + static_assert(std::is_same::value, + "types must be the same"); + static_assert(std::is_same>::value, + "types must be the same"); + static_assert( + std::is_same, 1>>::value, + "types must be the same"); + static_assert( + std::is_same, 2>, 1>>::value, + "types must be the same"); + static_assert( + std::is_same, 3>, 2>, + 1>>::value, + "types must be the same"); + + return 0; +} diff --git a/tests/base/ndarray.output b/tests/base/ndarray.output new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/base/ndarray.output @@ -0,0 +1 @@ +