diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 33d697f..90c6cdf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -145,7 +145,7 @@ set(XTENSOR_BLAS_TESTS test_dot.cpp test_dot_extended.cpp test_qr.cpp - test_complex_float_norm.cpp + test_float_norm.cpp ) add_executable(test_xtensor_blas ${XTENSOR_BLAS_TESTS} ${XTENSOR_BLAS_HEADERS} ${XTENSOR_HEADERS}) diff --git a/test/test_complex_float_norm.cpp b/test/test_float_norm.cpp similarity index 72% rename from test/test_complex_float_norm.cpp rename to test/test_float_norm.cpp index 6bf1092..b41757b 100644 --- a/test/test_complex_float_norm.cpp +++ b/test/test_float_norm.cpp @@ -21,12 +21,17 @@ namespace xt { -TEST(xblas, norm_complex_float) { - xt::xarray> a = {std::complex(1.0f, 2.0f), std::complex(3.0f, 4.0f)}; - auto res = linalg::norm(a); + TEST(xblas, norm_complex_float) { + xt::xarray> a = {std::complex(1.0f, 2.0f), std::complex(3.0f, 4.0f)}; + auto res = linalg::norm(a); - EXPECT_NEAR(res.real(), 5.4772f, 1e-3f); - EXPECT_NEAR(res.imag(), 0.0f, 1e-3f); -} + EXPECT_NEAR(res.real(), 5.4772f, 1e-3f); + EXPECT_NEAR(res.imag(), 0.0f, 1e-3f); + } + + TEST(xblas, norm_float_arange) + { + xt::linalg::norm(xt::arange(15), 1); + } } \ No newline at end of file