From: Matthias Maier Date: Sat, 12 Sep 2015 05:24:21 +0000 (-0500) Subject: Testsuite: Improve base/tensor_accessors_01 X-Git-Tag: v8.4.0-rc2~433^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66005f5eed34fd07ede77adcdb5f5d803221f4ee;p=dealii.git Testsuite: Improve base/tensor_accessors_01 --- diff --git a/tests/base/tensor_accessors_01.cc b/tests/base/tensor_accessors_01.cc index 10342da329..460883d877 100644 --- a/tests/base/tensor_accessors_01.cc +++ b/tests/base/tensor_accessors_01.cc @@ -41,8 +41,11 @@ int main() // 0 1 2 3 5 6 7 8 4 deallog << foo[0][1][2][0][2][0][1][2][1] << std::endl; - int &tmp = foo[0][1][2][0][2][0][1][2][1]; - tmp = 2 * foo[0][1][2][0][2][0][1][2][1]; + int temp = foo[0][1][2][0][2][0][1][2][1]; + int &ref = foo[0][1][2][0][2][0][1][2][1]; + ref = temp; + + foo[0][1][2][0][2][0][1][2][1] = temp + ref; deallog << t[0][1][2][0][1][2][0][1][2] << std::endl; } @@ -57,8 +60,8 @@ int main() // 0 1 2 3 5 6 7 8 4 deallog << const_foo[0][1][2][0][2][0][1][2][1] << std::endl; - int &tmp = foo[0][1][2][0][2][0][1][2][1]; - tmp = foo[0][1][2][0][2][0][1][2][1] / 2; + int &tmp = foo[0][1][2][0][2][0][1][2][1]; + tmp = const_foo[0][1][2][0][2][0][1][2][1] / 2; deallog << const_foo[0][1][2][0][2][0][1][2][1] << std::endl; }