Skip to content

Commit 5d1c02a

Browse files
committed
Adjusting test case to avoid warning, CodePlex issue 292
1 parent b2511c7 commit 5d1c02a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Release/tests/functional/pplx/pplx_test/pplxtask_tests.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,12 @@ struct TestException2
13601360
{
13611361
};
13621362

1363+
// CodePlex 292
1364+
static int ThrowFunc()
1365+
{
1366+
throw 42;
1367+
}
1368+
13631369
TEST(TestContinuationsWithTask)
13641370
{
13651371
{
@@ -1403,9 +1409,7 @@ TEST(TestContinuationsWithTask)
14031409
{
14041410
bool gotException = true;
14051411
int n2 = 0;
1406-
task<int> t([&]() -> int {
1407-
throw 42;
1408-
});
1412+
task<int> t(throwFunc);
14091413
t.then([&] (task<int> ti) {
14101414
try
14111415
{
@@ -1875,7 +1879,7 @@ TEST(PPL_Conversions_Nested)
18751879

18761880
TEST(PPL_Conversions_Exceptions)
18771881
{
1878-
pplx::task<int> t1([]() -> int { throw 2;});
1882+
pplx::task<int> t1(ThrowFunc);
18791883
concurrency::task<int> t2 = pplx::pplx_task_to_concurrency_task(t1);
18801884
try
18811885
{

0 commit comments

Comments
 (0)