diff -Naur xtensor-0.21.7.orig/test/test_xoperation.cpp xtensor-0.21.7/test/test_xoperation.cpp --- xtensor-0.21.7.orig/test/test_xoperation.cpp 2020-10-05 07:58:59.903264307 +0000 +++ xtensor-0.21.7/test/test_xoperation.cpp 2020-10-05 08:41:21.127559227 +0000 @@ -807,17 +807,18 @@ TEST(operation, left_shift) { xarray arr({5,1, 1000}); + xarray arr2({2,1, 3}); xarray res1 = left_shift(arr, 4); - xarray res2 = left_shift(arr, arr); + xarray res2 = left_shift(arr, arr2); EXPECT_EQ(left_shift(arr, 4)(1), 16); xarray expected1 = {80, 16, 16000}; - xarray expected2 = {160, 2, 256000}; + xarray expected2 = {20, 2, 8000}; EXPECT_EQ(expected1, res1); EXPECT_EQ(expected2, res2); xarray res3 = arr << 4; - xarray res4 = arr << arr; + xarray res4 = arr << arr2; EXPECT_EQ(expected1, res3); EXPECT_EQ(expected2, res4); } @@ -825,17 +826,18 @@ TEST(operation, right_shift) { xarray arr({5,1, 1000}); + xarray arr2({2,1, 3}); xarray res1 = right_shift(arr, 4); - xarray res2 = right_shift(arr, arr); + xarray res2 = right_shift(arr, arr2); EXPECT_EQ(right_shift(arr, 4)(1), 0); xarray expected1 = {0, 0, 62}; - xarray expected2 = {0, 0, 3}; + xarray expected2 = {1, 0, 125}; EXPECT_EQ(expected1, res1); EXPECT_EQ(expected2, res2); xarray res3 = arr >> 4; - xarray res4 = arr >> arr; + xarray res4 = arr >> arr2; EXPECT_EQ(expected1, res3); EXPECT_EQ(expected2, res4); }