Skip to content

Commit

Permalink
test error case
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Nov 5, 2022
1 parent 1a68ee8 commit 3cbae24
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cuda/test/solver/lower_trs_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,14 @@ TEST_F(LowerTrs, CudaMultipleRhsApplyIsEquivalentToRef)
}


TEST_F(LowerTrs, CudaApplyThrowsWithWrongNumRHS)
{
initialize_data(50, 3);
auto d_lower_trs_factory = gko::solver::LowerTrs<>::build().on(cuda);
auto d_solver = d_lower_trs_factory->generate(d_csr_mtx);

ASSERT_THROW(d_solver->apply(d_b2.get(), d_x.get()), gko::ValueMismatch);
}


} // namespace
10 changes: 10 additions & 0 deletions cuda/test/solver/upper_trs_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,14 @@ TEST_F(UpperTrs, CudaMultipleRhsApplyIsEquivalentToRef)
}


TEST_F(UpperTrs, CudaApplyThrowsWithWrongNumRHS)
{
initialize_data(50, 3);
auto d_lower_trs_factory = gko::solver::UpperTrs<>::build().on(cuda);
auto d_solver = d_lower_trs_factory->generate(d_csr_mtx);

ASSERT_THROW(d_solver->apply(d_b2.get(), d_x.get()), gko::ValueMismatch);
}


} // namespace

0 comments on commit 3cbae24

Please sign in to comment.