mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Be specific when testing thrown exceptions
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: LOOT 0.10.2\n"
|
||||
"Project-Id-Version: LOOT 0.10.3\n"
|
||||
"Report-Msgid-Bugs-To: https://github.com/loot/loot/issues\n"
|
||||
"POT-Creation-Date: 2017-01-18 21:41+0000\n"
|
||||
"POT-Creation-Date: 2017-01-26 21:09+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -742,15 +742,15 @@ msgid ""
|
||||
"%3%"
|
||||
msgstr ""
|
||||
|
||||
#: src/backend/app/loot_state.cpp:130
|
||||
#: src/gui/state/loot_state.cpp:130
|
||||
msgid "Error: Could not create LOOT settings file. %1%"
|
||||
msgstr ""
|
||||
|
||||
#: src/backend/app/loot_state.cpp:137
|
||||
#: src/gui/state/loot_state.cpp:137
|
||||
msgid "Error: Settings parsing failed. %1%"
|
||||
msgstr ""
|
||||
|
||||
#: src/backend/app/loot_state.cpp:198
|
||||
#: src/gui/state/loot_state.cpp:198
|
||||
msgid "Error: Game-specific settings could not be initialised. %1%"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, loadListsShouldThrowIfNoMasterlistIsPresent) {
|
||||
EXPECT_ANY_THROW(db_->LoadLists(masterlistPath.string(), ""));
|
||||
EXPECT_THROW(db_->LoadLists(masterlistPath.string(), ""), FileAccessError);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, loadListsShouldThrowIfAMasterlistIsPresentButAUserlistDoesNotExistAtTheGivenPath) {
|
||||
ASSERT_NO_THROW(GenerateMasterlist());
|
||||
EXPECT_ANY_THROW(db_->LoadLists(masterlistPath.string(), userlistPath_.string()));
|
||||
EXPECT_THROW(db_->LoadLists(masterlistPath.string(), userlistPath_.string()), FileAccessError);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, loadListsShouldSucceedIfTheMasterlistIsPresentAndTheUserlistPathIsAnEmptyString) {
|
||||
@@ -169,28 +169,28 @@ TEST_P(DatabaseInterfaceTest, sortPluginsShouldSucceedIfPassedValidArguments) {
|
||||
ASSERT_EQ(expectedOrder, actualOrder);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAnInvalidArgsErrorIfTheMasterlistPathGivenIsInvalid) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(";//\?", url_, branch_));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheMasterlistPathGivenIsInvalid) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist(";//\?", url_, branch_), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAnInvalidArgsErrorIfTheMasterlistPathGivenIsEmpty) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist("", url_, branch_));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheMasterlistPathGivenIsEmpty) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist("", url_, branch_), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAGitErrorIfTheRepositoryUrlGivenCannotBeFound) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(masterlistPath.string(), "https://github.com/loot/oblivion-does-not-exist.git", branch_));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheRepositoryUrlGivenCannotBeFound) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist(masterlistPath.string(), "https://github.com/loot/oblivion-does-not-exist.git", branch_), std::system_error);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAnInvalidArgsErrorIfTheRepositoryUrlGivenIsEmpty) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(masterlistPath.string(), "", branch_));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheRepositoryUrlGivenIsEmpty) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist(masterlistPath.string(), "", branch_), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAGitErrorIfTheRepositoryBranchGivenCannotBeFound) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(masterlistPath.string(), url_, "missing-branch"));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheRepositoryBranchGivenCannotBeFound) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist(masterlistPath.string(), url_, "missing-branch"), std::system_error);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAnInvalidArgsErrorIfTheRepositoryBranchGivenIsEmpty) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(masterlistPath.string(), url_, ""));
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldThrowIfTheRepositoryBranchGivenIsEmpty) {
|
||||
EXPECT_THROW(db_->UpdateMasterlist(masterlistPath.string(), url_, ""), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldSucceedIfPassedValidParametersAndOutputTrueIfTheMasterlistWasUpdated) {
|
||||
@@ -418,11 +418,11 @@ TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnOkAndWriteToFileIfArgu
|
||||
EXPECT_TRUE(boost::filesystem::exists(minimalOutputPath_));
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnAFileWriteErrorIfTheFileAlreadyExistsAndTheOverwriteArgumentIsFalse) {
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldThrowIfTheFileAlreadyExistsAndTheOverwriteArgumentIsFalse) {
|
||||
ASSERT_NO_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), false));
|
||||
ASSERT_TRUE(boost::filesystem::exists(minimalOutputPath_));
|
||||
|
||||
EXPECT_ANY_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), false));
|
||||
EXPECT_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), false), FileAccessError);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnOkAndWriteToFileIfTheArgumentsAreValidAndTheOverwriteArgumentIsTrue) {
|
||||
@@ -437,7 +437,7 @@ TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnOkIfTheFileAlreadyExis
|
||||
EXPECT_NO_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), true));
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnAFileWriteErrorIfPathGivenExistsAndIsReadOnly) {
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldThrowIfPathGivenExistsAndIsReadOnly) {
|
||||
ASSERT_NO_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), false));
|
||||
ASSERT_TRUE(boost::filesystem::exists(minimalOutputPath_));
|
||||
|
||||
@@ -445,7 +445,7 @@ TEST_P(DatabaseInterfaceTest, writeMinimalListShouldReturnAFileWriteErrorIfPathG
|
||||
boost::filesystem::perms::remove_perms
|
||||
| boost::filesystem::perms::owner_write);
|
||||
|
||||
EXPECT_ANY_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), true));
|
||||
EXPECT_THROW(db_->WriteMinimalList(minimalOutputPath_.string(), true), FileAccessError);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, writeMinimalListShouldWriteOnlyBashTagsAndDirtyInfo) {
|
||||
|
||||
@@ -125,7 +125,7 @@ TEST_P(GameCacheTest, addingAPluginThatIsAlreadyCachedShouldOverwriteExistingEnt
|
||||
}
|
||||
|
||||
TEST_P(GameCacheTest, gettingAPluginThatIsNotCachedShouldThrow) {
|
||||
EXPECT_ANY_THROW(cache_.GetPlugin(blankEsm));
|
||||
EXPECT_THROW(cache_.GetPlugin(blankEsm), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(GameCacheTest, gettingAPluginShouldBeCaseInsensitive) {
|
||||
|
||||
@@ -258,17 +258,17 @@ TEST_P(GameSettingsTest, decodingFromYamlShouldInterpretTheYamlCorrectly) {
|
||||
|
||||
TEST_P(GameSettingsTest, decodingFromAnInvalidYamlMapShouldThrowAnException) {
|
||||
YAML::Node node = YAML::Load("type: 'Invalid'\n");
|
||||
EXPECT_ANY_THROW(node.as<GameSettings>());
|
||||
EXPECT_THROW(node.as<GameSettings>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST_P(GameSettingsTest, decodingFromAYamlScalarShouldThrowAnException) {
|
||||
YAML::Node node = YAML::Load("scalar");
|
||||
EXPECT_ANY_THROW(node.as<GameSettings>());
|
||||
EXPECT_THROW(node.as<GameSettings>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST_P(GameSettingsTest, decodingFromAYamlListShouldThrowAnException) {
|
||||
YAML::Node node = YAML::Load("[0, 1, 2]");
|
||||
EXPECT_ANY_THROW(node.as<GameSettings>());
|
||||
EXPECT_THROW(node.as<GameSettings>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST_P(GameSettingsTest, decodingFromAnIncompleteYamlMapShouldUseDefaultValuesForMissingSettings) {
|
||||
|
||||
@@ -232,7 +232,7 @@ TEST_P(GameTest, shouldThrowIfCheckingIfPluginThatIsntLoadedIsActiveAndGameHasNo
|
||||
Game game(GetParam());
|
||||
game.SetGamePath(dataPath.parent_path());
|
||||
|
||||
EXPECT_ANY_THROW(game.IsPluginActive(blankEsm));
|
||||
EXPECT_THROW(game.IsPluginActive(blankEsm), std::system_error);
|
||||
}
|
||||
|
||||
TEST_P(GameTest, shouldShowBlankEsmAsActiveIfItHasNotBeenLoadedAndTheGameHasBeenInitialised) {
|
||||
|
||||
@@ -53,7 +53,7 @@ TEST(set, decodingFromAYamlListShouldStoreValuesCorrectly) {
|
||||
|
||||
TEST(set, decodingFromAYamlListThatContainsDuplicateElementsShouldThrow) {
|
||||
YAML::Node node = YAML::Load("[a, b, c, c]");
|
||||
EXPECT_ANY_THROW(node.as<std::set<std::string>>());
|
||||
EXPECT_THROW(node.as<std::set<std::string>>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST(set, emittingAsYamlShouldOutputAYamlListContainingAllValues) {
|
||||
@@ -117,7 +117,7 @@ TEST_F(unordered_set, decodingFromAYamlListShouldStoreValuesCorrectly) {
|
||||
TEST_F(unordered_set, decodingFromAYamlListThatContainsDuplicateElementsShouldThrow) {
|
||||
YAML::Node node = YAML::Load("[a, b, c, c]");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<std::unordered_set<std::string>>());
|
||||
EXPECT_THROW(node.as<std::unordered_set<std::string>>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST_F(unordered_set, emittingAsYamlShouldOutputAYamlListContainingAllValues) {
|
||||
|
||||
@@ -108,40 +108,40 @@ TEST_P(MasterlistTest, updateWithGameParameterShouldReturnFalseIfAnUpToDateMaste
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfAnInvalidPathIsGiven) {
|
||||
Masterlist masterlist;
|
||||
|
||||
EXPECT_ANY_THROW(masterlist.Update(";//\?", repoUrl, repoBranch));
|
||||
EXPECT_THROW(masterlist.Update(";//\?", repoUrl, repoBranch), boost::filesystem::filesystem_error);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfABlankPathIsGiven) {
|
||||
Masterlist masterlist;
|
||||
|
||||
EXPECT_ANY_THROW(masterlist.Update("", repoUrl, repoBranch));
|
||||
EXPECT_THROW(masterlist.Update("", repoUrl, repoBranch), boost::filesystem::filesystem_error);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfABranchThatDoesNotExistIsGiven) {
|
||||
Masterlist masterlist;
|
||||
|
||||
EXPECT_ANY_THROW(masterlist.Update(masterlistPath,
|
||||
repoUrl,
|
||||
"missing-branch"));
|
||||
EXPECT_THROW(masterlist.Update(masterlistPath,
|
||||
repoUrl,
|
||||
"missing-branch"), std::system_error);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfABlankBranchIsGiven) {
|
||||
Masterlist masterlist;
|
||||
|
||||
EXPECT_ANY_THROW(masterlist.Update(masterlistPath, repoUrl, ""));
|
||||
EXPECT_THROW(masterlist.Update(masterlistPath, repoUrl, ""), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfAUrlThatDoesNotExistIsGiven) {
|
||||
Masterlist masterlist;
|
||||
|
||||
EXPECT_ANY_THROW(masterlist.Update(masterlistPath,
|
||||
"https://github.com/loot/does-not-exist.git",
|
||||
repoBranch));
|
||||
EXPECT_THROW(masterlist.Update(masterlistPath,
|
||||
"https://github.com/loot/does-not-exist.git",
|
||||
repoBranch), std::system_error);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldThrowIfABlankUrlIsGiven) {
|
||||
Masterlist masterlist;
|
||||
EXPECT_ANY_THROW(masterlist.Update(masterlistPath, "", repoBranch));
|
||||
EXPECT_THROW(masterlist.Update(masterlistPath, "", repoBranch), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, updateWithSeparateParametersShouldReturnTrueIfNoMasterlistExists) {
|
||||
@@ -165,14 +165,14 @@ TEST_P(MasterlistTest, updateWithSeparateParametersShouldReturnFalseIfAnUpToDate
|
||||
|
||||
TEST_P(MasterlistTest, getInfoShouldThrowIfNoMasterlistExistsAtTheGivenPath) {
|
||||
Masterlist masterlist;
|
||||
EXPECT_ANY_THROW(masterlist.GetInfo(masterlistPath, false));
|
||||
EXPECT_THROW(masterlist.GetInfo(masterlistPath, false), FileAccessError);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, getInfoShouldThrowIfTheGivenPathDoesNotBelongToAGitRepository) {
|
||||
ASSERT_NO_THROW(boost::filesystem::copy("./testing-metadata/masterlist.yaml", masterlistPath));
|
||||
|
||||
Masterlist masterlist;
|
||||
EXPECT_ANY_THROW(masterlist.GetInfo(masterlistPath, false));
|
||||
EXPECT_THROW(masterlist.GetInfo(masterlistPath, false), GitStateError);
|
||||
}
|
||||
|
||||
TEST_P(MasterlistTest, getInfoShouldReturnRevisionAndDateStringsOfTheCorrectLengthsWhenRequestingALongId) {
|
||||
|
||||
@@ -178,7 +178,7 @@ TEST(File, decodingFromYamlShouldThrowIfAnInvalidMapIsGiven) {
|
||||
TEST(File, decodingFromYamlShouldThrowIfAListIsGiven) {
|
||||
YAML::Node node = YAML::Load("[0, 1, 2]");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<File>());
|
||||
EXPECT_THROW(node.as<File>(), YAML::RepresentationException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ TEST(Location, decodingFromYamlScalarShouldSetUrlToScalarValueAndLeaveNameEmpty)
|
||||
TEST(Location, decodingFromYamlShouldThrowIfAListIsGiven) {
|
||||
YAML::Node node = YAML::Load("[0, 1, 2]");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<Location>());
|
||||
EXPECT_THROW(node.as<Location>(), YAML::RepresentationException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ TEST(MessageContent, decodingFromYamlShouldSetDataCorrectly) {
|
||||
TEST(MessageContent, decodingFromYamlScalarShouldThrow) {
|
||||
YAML::Node node = YAML::Load("scalar");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<MessageContent>());
|
||||
EXPECT_THROW(node.as<MessageContent>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST(MessageContent, decodingFromYamlListShouldThrow) {
|
||||
YAML::Node node = YAML::Load("[0, 1, 2]");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<MessageContent>());
|
||||
EXPECT_THROW(node.as<MessageContent>(), YAML::RepresentationException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ TEST_P(MessageTest, vectorContentConstructorShouldThrowIfMultipleContentStringsA
|
||||
MessageContent("content1", LanguageCode::german),
|
||||
MessageContent("content2", LanguageCode::french),
|
||||
});
|
||||
EXPECT_ANY_THROW(Message(MessageType::error, contents, "condition1"));
|
||||
EXPECT_THROW(Message(MessageType::error, contents, "condition1"), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(MessageTest, messagesWithDifferentContentStringsShouldBeUnequal) {
|
||||
|
||||
@@ -272,13 +272,13 @@ TEST_P(PluginCleaningDataTest, decodingFromYamlShouldStoreAllNonZeroCounts) {
|
||||
TEST_P(PluginCleaningDataTest, decodingFromYamlScalarShouldThrow) {
|
||||
YAML::Node node = YAML::Load("scalar");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<PluginCleaningData>());
|
||||
EXPECT_THROW(node.as<PluginCleaningData>(), YAML::RepresentationException);
|
||||
}
|
||||
|
||||
TEST_P(PluginCleaningDataTest, decodingFromYamlListShouldThrow) {
|
||||
YAML::Node node = YAML::Load("[0, 1, 2]");
|
||||
|
||||
EXPECT_ANY_THROW(node.as<PluginCleaningData>());
|
||||
EXPECT_THROW(node.as<PluginCleaningData>(), YAML::RepresentationException);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ TEST_P(MetadataListTest, loadShouldLoadBashTags) {
|
||||
TEST_P(MetadataListTest, loadShouldThrowIfAnInvalidMetadataFileIsGiven) {
|
||||
MetadataList ml;
|
||||
for (const auto& path : invalidMetadataPaths) {
|
||||
EXPECT_ANY_THROW(ml.Load(path));
|
||||
EXPECT_THROW(ml.Load(path), FileAccessError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ TEST_P(MetadataListTest, loadShouldClearExistingDataIfAnInvalidMetadataFileIsGiv
|
||||
ASSERT_FALSE(metadataList.Plugins().empty());
|
||||
ASSERT_FALSE(metadataList.BashTags().empty());
|
||||
|
||||
EXPECT_ANY_THROW(metadataList.Load(blankEsm));
|
||||
EXPECT_THROW(metadataList.Load(blankEsm), FileAccessError);
|
||||
EXPECT_TRUE(metadataList.Messages().empty());
|
||||
EXPECT_TRUE(metadataList.Plugins().empty());
|
||||
EXPECT_TRUE(metadataList.BashTags().empty());
|
||||
@@ -150,7 +150,7 @@ TEST_P(MetadataListTest, loadShouldClearExistingDataIfAMissingMetadataFileIsGive
|
||||
ASSERT_FALSE(metadataList.Plugins().empty());
|
||||
ASSERT_FALSE(metadataList.BashTags().empty());
|
||||
|
||||
EXPECT_ANY_THROW(metadataList.Load(missingMetadataPath));
|
||||
EXPECT_THROW(metadataList.Load(missingMetadataPath), FileAccessError);
|
||||
EXPECT_TRUE(metadataList.Messages().empty());
|
||||
EXPECT_TRUE(metadataList.Plugins().empty());
|
||||
EXPECT_TRUE(metadataList.BashTags().empty());
|
||||
@@ -265,7 +265,7 @@ TEST_P(MetadataListTest, addPluginShouldThrowIfAMatchingPluginAlreadyExists) {
|
||||
ASSERT_EQ(blankEsm, plugin.Name());
|
||||
ASSERT_FALSE(plugin.HasNameOnly());
|
||||
|
||||
ASSERT_ANY_THROW(metadataList.AddPlugin(PluginMetadata(blankEsm)));
|
||||
EXPECT_THROW(metadataList.AddPlugin(PluginMetadata(blankEsm)), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST_P(MetadataListTest, erasePluginShouldRemoveStoredMetadataForTheGivenPlugin) {
|
||||
|
||||
@@ -27,6 +27,7 @@ along with LOOT. If not, see
|
||||
|
||||
#include "backend/plugin/plugin_sorter.h"
|
||||
|
||||
#include "loot/exception/cyclic_interaction_error.h"
|
||||
#include "tests/common_game_test_fixture.h"
|
||||
|
||||
namespace loot {
|
||||
@@ -92,7 +93,7 @@ TEST_P(PluginSorterTest, failedSortShouldNotClearExistingGameMessages) {
|
||||
ASSERT_FALSE(game_.GetMessages().empty());
|
||||
|
||||
PluginSorter ps;
|
||||
EXPECT_ANY_THROW(ps.Sort(game_, LanguageCode::english));
|
||||
EXPECT_THROW(ps.Sort(game_, LanguageCode::english), CyclicInteractionError);
|
||||
EXPECT_FALSE(game_.GetMessages().empty());
|
||||
}
|
||||
|
||||
@@ -234,7 +235,7 @@ TEST_P(PluginSorterTest, sortingShouldThrowIfACyclicInteractionIsEncountered) {
|
||||
game_.GetUserlist().AddPlugin(plugin);
|
||||
|
||||
PluginSorter ps;
|
||||
EXPECT_ANY_THROW(ps.Sort(game_, LanguageCode::english));
|
||||
EXPECT_THROW(ps.Sort(game_, LanguageCode::english), CyclicInteractionError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user