2
0
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:
Alex Olivas
2015-11-18 16:27:19 -07:00
parent c75f5dc858
commit 0a2d7fa0e1
2 changed files with 14 additions and 0 deletions

View File

@@ -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 =