mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
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:
parent
c667b029ae
commit
b986c742cd
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user