Skip to content

Commit c176296

Browse files
committed
Do not test throwing things other than exceptions from the thread pool.
1 parent f96a68d commit c176296

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tiledb/common/thread_pool/test/unit_thread_pool.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
447447
results.push_back(pool.execute([&result]() {
448448
auto tmp = result++;
449449
if (tmp == 13) {
450-
throw(std::string("Unripe banana"));
450+
throw std::exception("Unripe banana");
451451
}
452452
}));
453453
}
@@ -479,10 +479,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
479479
results.push_back(pool.execute([&result]() {
480480
auto tmp = result++;
481481
if (tmp == 13) {
482-
throw(std::string("Unripe banana"));
482+
throw std::string("Unripe banana");
483483
}
484484
if (tmp == 31) {
485-
throw(Status_TileError("Unbaked potato"));
485+
throw std::exception("Unbaked potato");
486486
}
487487
}));
488488
}
@@ -500,10 +500,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
500500
results.push_back(pool.execute([&result]() {
501501
auto tmp = result++;
502502
if (tmp == 31) {
503-
throw(std::string("Unripe banana"));
503+
throw std::string("Unripe banana");
504504
}
505505
if (tmp == 13) {
506-
throw(Status_TileError("Unbaked potato"));
506+
throw std::exception("Unbaked potato");
507507
}
508508
}));
509509
}
@@ -521,10 +521,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
521521
results.push_back(pool.execute([i, &result]() {
522522
result++;
523523
if (i == 13) {
524-
throw(std::string("Unripe banana"));
524+
throw std::exception("Unripe banana");
525525
}
526526
if (i == 31) {
527-
throw(Status_TileError("Unbaked potato"));
527+
throw std::exception("Unbaked potato");
528528
}
529529
}));
530530
}
@@ -542,10 +542,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
542542
results.push_back(pool.execute([i, &result]() {
543543
++result;
544544
if (i == 31) {
545-
throw(std::string("Unripe banana"));
545+
throw(std::exception("Unripe banana"));
546546
}
547547
if (i == 13) {
548-
throw(Status_TileError("Unbaked potato"));
548+
throw std::exception("Unbaked potato");
549549
}
550550
}));
551551
}

0 commit comments

Comments
 (0)