mirror of
https://github.com/boostorg/compute.git
synced 2026-01-28 07:02:15 +00:00
if the ifstream can't be created in program::create_with_source_file then it throws std::ios_base::failure.
This commit is contained in:
@@ -55,6 +55,16 @@ BOOST_AUTO_TEST_CASE(program_source)
|
||||
BOOST_CHECK_EQUAL(std::string(source), program.source());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(program_source_no_file)
|
||||
{
|
||||
// create program from a non-existant source file
|
||||
// and verifies it throws.
|
||||
BOOST_CHECK_THROW(boost::compute::program program =
|
||||
boost::compute::program::create_with_source
|
||||
(std::string(), context),
|
||||
std::ios_base::failure);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(create_kernel)
|
||||
{
|
||||
boost::compute::program program =
|
||||
|
||||
Reference in New Issue
Block a user