mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
Add unit test for printing empty tensors
This commit is contained in:
parent
360a743a10
commit
361dbd246d
@ -40,6 +40,12 @@ static void test_output_1d()
|
||||
|
||||
std::string expected("0\n1\n2\n3\n4");
|
||||
VERIFY_IS_EQUAL(std::string(os.str()), expected);
|
||||
|
||||
Eigen::Tensor<double,1,DataLayout> empty_tensor(0);
|
||||
std::stringstream empty_os;
|
||||
empty_os << empty_tensor;
|
||||
std::string empty_string;
|
||||
VERIFY_IS_EQUAL(std::string(empty_os.str()), empty_string);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user