Update tests

This commit is contained in:
stefiosif
2022-12-05 23:44:55 +02:00
parent 7c78bbd7ca
commit 55efd8b816
4 changed files with 113 additions and 113 deletions

View File

@@ -15,7 +15,7 @@ TEST_SUITE("Graph") {
// 7 --> 9
// 6 --> 9 --> 10 --> 11 --> 12 --> 13 --> 9
// 12 --> 10
Digraph<std::uint16_t> G;
Digraph<int> G;
G.insert(1, 2);
G.insert(2, 3);
G.insert(3, 1);
@@ -39,8 +39,8 @@ TEST_SUITE("Graph") {
auto reverse = G.reverse();
std::unordered_map<std::uint16_t,
std::unordered_set<std::uint16_t>> expected = {
std::unordered_map<int,
std::unordered_set<int>> expected = {
{1, {3}},
{2, {1}},
{3, {2, 5}},
@@ -66,7 +66,7 @@ TEST_SUITE("Graph") {
// 7 --> 9
// 6 --> 9 --> 10 --> 11 --> 12 --> 13 --> 9
// 12 --> 10
Digraph<std::uint16_t> G;
Digraph<int> G;
G.insert(1, 2);
G.insert(2, 3);
G.insert(3, 1);
@@ -98,7 +98,7 @@ TEST_SUITE("Graph") {
// 2 --> 3 --> 1
// 3 --> 5
// 3 --> 9
Digraph<std::uint16_t> G;
Digraph<int> G;
G.insert(1, 2);
G.insert(2, 4);
G.insert(2, 3);
@@ -117,9 +117,9 @@ TEST_SUITE("Graph") {
REQUIRE_EQ(G.V(), 9);
auto SCCs = algo::Tarjan<std::uint16_t>(G.adjList).execute();
auto SCCs = algo::Tarjan<int>(G.adjList).execute();
std::vector<std::vector<std::uint16_t>> expected = {
std::vector<std::vector<int>> expected = {
{5, 6, 7, 8, 9},
{4},
{1, 2, 3}