You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
769 B
23 lines
769 B
|
6 years ago
|
#include <gtest/gtest.h>
|
||
|
|
#include "devilution.h"
|
||
|
|
|
||
|
|
TEST(Appfat, app_fatal) {
|
||
|
6 years ago
|
EXPECT_EXIT(dvl::app_fatal("test"), ::testing::ExitedWithCode(1), "test");
|
||
|
6 years ago
|
}
|
||
|
|
|
||
|
|
TEST(Appfat, ErrDlg) {
|
||
|
6 years ago
|
EXPECT_EXIT(dvl::ErrDlg("Title", "Unknown error", "appfat.cpp", 7), ::testing::ExitedWithCode(1), "Unknown error\n\nThe error occurred at: appfat.cpp line 7");
|
||
|
6 years ago
|
}
|
||
|
|
|
||
|
|
TEST(Appfat, FileErrDlg) {
|
||
|
6 years ago
|
EXPECT_EXIT(dvl::FileErrDlg("devilution/image.cl2"), ::testing::ExitedWithCode(1), "devilution/image.cl2");
|
||
|
6 years ago
|
}
|
||
|
|
|
||
|
|
TEST(Appfat, InsertCDDlg) {
|
||
|
6 years ago
|
EXPECT_EXIT(dvl::InsertCDDlg("devilution/image.cl2"), ::testing::ExitedWithCode(1), "devilution/image.cl2");
|
||
|
6 years ago
|
}
|
||
|
|
|
||
|
|
TEST(Appfat, DirErrorDlg) {
|
||
|
6 years ago
|
EXPECT_EXIT(dvl::DirErrorDlg("/"), ::testing::ExitedWithCode(1), "Unable to write to location:\n/");
|
||
|
6 years ago
|
}
|