From: Wolfgang Bangerth Date: Tue, 3 Feb 2015 15:19:07 +0000 (-0600) Subject: Extend test. Reindent it. X-Git-Tag: v8.3.0-rc1~502^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78dd2443b7a8722ab1ee87ea7eafbc3c727436f4;p=dealii.git Extend test. Reindent it. --- diff --git a/include/deal.II/base/tensor_base.h b/include/deal.II/base/tensor_base.h index db9e55b9c8..c4b5f46cab 100644 --- a/include/deal.II/base/tensor_base.h +++ b/include/deal.II/base/tensor_base.h @@ -122,7 +122,7 @@ public: */ template Tensor (const Tensor<0,dim,OtherNumber> &); - + /** * Conversion to Number. Since rank-0 tensors are scalars, this is a natural * operation. @@ -361,7 +361,7 @@ public: */ template Tensor (const Tensor<1,dim,OtherNumber> &); - + /** * Read access to the indexth coordinate. * diff --git a/tests/base/tensor_nondefault_constructor.cc b/tests/base/tensor_nondefault_constructor.cc index 6357f575c8..3c151e84ce 100644 --- a/tests/base/tensor_nondefault_constructor.cc +++ b/tests/base/tensor_nondefault_constructor.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1998 - 2014 by the deal.II authors +// Copyright (C) 1998 - 2015 by the deal.II authors // // This file is part of the deal.II library. // @@ -38,34 +38,40 @@ int main () // rank 2 { - Tensor<2,dim,float> t(a); - Tensor<2,dim,double> dt(t), dt2; - dt2 = t; - Assert (dt2 == dt, ExcInternalError()); + Tensor<2,dim,float> t(a); + Tensor<2,dim,double> dt(t), dt2; + dt2 = t; + Assert (dt2 == dt, ExcInternalError()); + Assert (dt == dt2, ExcInternalError()); - Tensor<2,dim,float> ft(dt), ft2; - ft2 = dt; - Assert (ft2 == ft, ExcInternalError()); + Tensor<2,dim,float> ft(dt), ft2; + ft2 = dt; + Assert (ft2 == ft, ExcInternalError()); + Assert (ft == ft2, ExcInternalError()); - Tensor<2,dim,std::complex > ct(dt), ct2; - ct2 = dt; - Assert (ct2 == ct, ExcInternalError()); + Tensor<2,dim,std::complex > ct(dt), ct2; + ct2 = dt; + Assert (ct2 == ct, ExcInternalError()); + Assert (ct == ct2, ExcInternalError()); } // rank 1 { - Tensor<1,dim,float> t(b); - Tensor<1,dim,double> dt(t), dt2; - dt2 = t; - Assert (dt2 == dt, ExcInternalError()); + Tensor<1,dim,float> t(b); + Tensor<1,dim,double> dt(t), dt2; + dt2 = t; + Assert (dt2 == dt, ExcInternalError()); + Assert (dt == dt2, ExcInternalError()); - Tensor<1,dim,float> ft(dt),ft2; + Tensor<1,dim,float> ft(dt),ft2; ft2 = dt; Assert (ft2 == ft, ExcInternalError()); + Assert (ft == ft2, ExcInternalError()); Tensor<1,dim,std::complex> ct(dt), ct2; ct2 = dt; - Assert (ct2 == ct, ExcInternalError()); + Assert (ct2 == ct, ExcInternalError()); + Assert (ct == ct2, ExcInternalError()); } deallog << "OK." << std::endl; diff --git a/tests/base/tensor_nondefault_constructor.output b/tests/base/tensor_nondefault_constructor.output index 6b3ab10675..56034c8fff 100644 --- a/tests/base/tensor_nondefault_constructor.output +++ b/tests/base/tensor_nondefault_constructor.output @@ -1 +1,2 @@ + DEAL::OK.