diff --git a/tests/test_static_types.cpp b/tests/test_static_types.cpp index 07355c6..73a4987 100644 --- a/tests/test_static_types.cpp +++ b/tests/test_static_types.cpp @@ -1,57 +1,57 @@ /** * * @author Lucas Frérot * * @section LICENSE * * Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de * Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des * Solides) * * Tamaas is free software: you can 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 3 of the License, or (at your option) any * later version. * * Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Tamaas. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "test.hh" #include "static_types.hh" using namespace tamaas; /* -------------------------------------------------------------------------- */ TEST(TestStaticTypes, GEMV) { UInt A_[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; UInt b_[] = {1, 2, 3}; MatrixProxy A(A_[0]); VectorProxy b(b_[0]); auto res = A * b; std::vector solution = {14, 32, 50}; ASSERT_TRUE(compare(res, solution)) << "Matrix multiplication fail"; } TEST(TestStaticTypes, Dot) { UInt a_[] = {2, 3}; UInt b_[] = {1, 5}; VectorProxy a(a_[0]), b(b_[0]); ASSERT_EQ(a.dot(b), 17) << "Dot product fail"; } TEST(TestStaticTypes, Norm) { - Real a_[] = {2., 3.}; + Real a_[] = {3., 4.}; VectorProxy a(a_[0]); ASSERT_DOUBLE_EQ(a.l2norm(), 5) << "L2 norm fail"; }