Skip to content

Instantly share code, notes, and snippets.

@rubenwardy
Created July 17, 2021 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubenwardy/1d4d5f068054fdf8dc0e176e40f2c4b9 to your computer and use it in GitHub Desktop.
Save rubenwardy/1d4d5f068054fdf8dc0e176e40f2c4b9 to your computer and use it in GitHub Desktop.
Test(ModOrderResolverRedundantTests) {
std::vector<ModConfig> mods;
mods.push_back({
"modB",
"rubenwardy",
"",
std::vector<std::string>{"modC"}
});
mods.push_back({
"modA",
"rubenwardy",
"",
std::vector<std::string>{"modB", "modC"},
});
mods.push_back({
"modC",
"rubenwardy",
"",
{},
});
ModOrderResolver resolver(mods);
auto orderedMods = resolver.resolve();
Assert(orderedMods[0].name == "modC");
Assert(orderedMods[1].name == "modB");
Assert(orderedMods[2].name == "modA");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment