From 66005f5eed34fd07ede77adcdb5f5d803221f4ee Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 12 Sep 2015 00:24:21 -0500 Subject: [PATCH] Testsuite: Improve base/tensor_accessors_01 --- tests/base/tensor_accessors_01.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } -- 2.39.5