Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added throwing test #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/test_zfunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,25 @@ namespace xt

EXPECT_EQ(zres.get_array<double>(), expected);
}

TEST_CASE("bad_function_call")
{

zdispatcher_t<detail::plus, 2>::init();
zdispatcher_t<detail::xassign_dummy_functor, 1>::init();

auto x0 = xarray<int>::from_shape({2,2});
auto x1 = xarray<int>::from_shape({2,2});

zarray z0(x0);
zarray z1(x1);

auto res = xarray<double>::from_shape({2,2});
zarray zres(res);

zres = z0 + z1;

}

}
TEST_SUITE_END();