From 7fd30cdc78ad25db1f4f1f5e615ac5338ed8411b Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Tue, 29 Jun 2021 14:25:41 +0200 Subject: [PATCH 1/2] added throwing test --- test/test_zfunction.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/test_zfunction.cpp b/test/test_zfunction.cpp index 39b307c..39b65e3 100644 --- a/test/test_zfunction.cpp +++ b/test/test_zfunction.cpp @@ -140,5 +140,25 @@ namespace xt EXPECT_EQ(zres.get_array(), expected); } + + TEST_CASE("bad_function_call") + { + + zdispatcher_t::init(); + + + auto x0 = xarray::from_shape({2,2}); + auto x1 = xarray::from_shape({2,2}); + + zarray z0(x0); + zarray z1(x1); + + auto res = xarray::from_shape({2,2}); + zarray zres(res); + + zres = x0 + x1; + + } + } TEST_SUITE_END(); \ No newline at end of file From 369d0e29dd62c47df9350ecc947fe0ad8f231214 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Tue, 29 Jun 2021 18:37:51 +0200 Subject: [PATCH 2/2] updated issue --- test/test_zfunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_zfunction.cpp b/test/test_zfunction.cpp index 39b65e3..c83cba2 100644 --- a/test/test_zfunction.cpp +++ b/test/test_zfunction.cpp @@ -145,8 +145,8 @@ namespace xt { zdispatcher_t::init(); - - + zdispatcher_t::init(); + auto x0 = xarray::from_shape({2,2}); auto x1 = xarray::from_shape({2,2}); @@ -156,7 +156,7 @@ namespace xt auto res = xarray::from_shape({2,2}); zarray zres(res); - zres = x0 + x1; + zres = z0 + z1; }