Relaxed the resizing checks so that they don't fail with gcc >= 5.3

This commit is contained in:
Benoit Steiner 2016-10-13 10:59:46 -07:00
parent ac63d6891c
commit d0ee2267d6

View File

@ -299,22 +299,21 @@ static void test_resize()
VERIFY_IS_EQUAL(epsilon.dimension(0), 2);
VERIFY_IS_EQUAL(epsilon.dimension(1), 3);
VERIFY_IS_EQUAL(epsilon.dimension(2), 7);
VERIFY_IS_EQUAL(epsilon.dimensions().TotalSize(), 2*3*7);
VERIFY_IS_EQUAL(epsilon.size(), 2*3*7);
const int* old_data = epsilon.data();
epsilon.resize(3,2,7);
VERIFY_IS_EQUAL(epsilon.dimension(0), 3);
VERIFY_IS_EQUAL(epsilon.dimension(1), 2);
VERIFY_IS_EQUAL(epsilon.dimension(2), 7);
VERIFY_IS_EQUAL(epsilon.dimensions().TotalSize(), 2*3*7);
VERIFY_IS_EQUAL(epsilon.size(), 2*3*7);
VERIFY_IS_EQUAL(epsilon.data(), old_data);
epsilon.resize(3,5,7);
VERIFY_IS_EQUAL(epsilon.dimension(0), 3);
VERIFY_IS_EQUAL(epsilon.dimension(1), 5);
VERIFY_IS_EQUAL(epsilon.dimension(2), 7);
VERIFY_IS_EQUAL(epsilon.dimensions().TotalSize(), 3*5*7);
VERIFY_IS_NOT_EQUAL(epsilon.data(), old_data);
VERIFY_IS_EQUAL(epsilon.size(), 3*5*7);
}
void test_cxx11_tensor_simple()