From 4bf9eaf77aa8c9a75b5d60c781d5d86b833b93d1 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 27 Jan 2016 17:09:30 -0800 Subject: Deleted an invalid assertion that prevented the assignment of empty tensors. --- unsupported/test/cxx11_tensor_empty.cpp | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 unsupported/test/cxx11_tensor_empty.cpp (limited to 'unsupported/test/cxx11_tensor_empty.cpp') diff --git a/unsupported/test/cxx11_tensor_empty.cpp b/unsupported/test/cxx11_tensor_empty.cpp new file mode 100644 index 000000000..ca03a297c --- /dev/null +++ b/unsupported/test/cxx11_tensor_empty.cpp @@ -0,0 +1,36 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2015 Benoit Steiner +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#include "main.h" + +#include + + +static void test_empty_tensor() +{ + Tensor source; + Tensor tgt1 = source; + Tensor tgt2; + tgt2 = source; +} + +static void test_empty_fixed_size_tensor() +{ + TensorFixedSize> source; + TensorFixedSize> tgt1 = source; + TensorFixedSize> tgt2; + tgt2 = source; +} + + +void test_cxx11_tensor_empty() +{ + CALL_SUBTEST(test_empty_tensor()); + CALL_SUBTEST(test_empty_fixed_size_tensor()); +} -- cgit v1.2.3