Test catching std::exception when move_range() fails

It looks like we're having problems catching std::runtime_error as
std::exception on Clang/macOS. So we'll test catching the more generic
exception which is the same that we do in timeline.cpp
This commit is contained in:
David Capello 2018-04-27 13:31:14 -03:00
parent c667b029ae
commit b986c742cd

View File

@ -635,11 +635,11 @@ TEST_F(DocRangeOps, MoveLayers) {
// Try with a background
layer1->setBackground(true);
EXPECT_ANY_THROW({
EXPECT_THROW({
move_range(doc,
layers_range(layer1),
layers_range(layer2), kDocumentRangeAfter);
});
}, std::exception);
EXPECT_LAYER_ORDER(layer1, layer2, layer3, layer4);
layer1->setBackground(false);
@ -684,11 +684,11 @@ TEST_F(DocRangeOps, MoveLayers) {
// Move three layers at the bottom (but we cannot because the bottom is a background layer)
layer1->setBackground(true);
EXPECT_ANY_THROW({
EXPECT_THROW({
move_range(doc,
layers_range(layer2, layer4),
layers_range(layer1), kDocumentRangeBefore);
});
}, std::exception);
EXPECT_LAYER_ORDER(layer1, layer2, layer3, layer4);
layer1->setBackground(false);