Skip to content

Commit

Permalink
Still trying to break
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jun 18, 2024
1 parent 7f2a8c0 commit ffbc2d7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@ TEST_CASE ("Abstract Tree Test", "[common][data-structures]")
REQUIRE (tree.size() == 0);
}

// SECTION ("Insertion")
// {
// tree.insertElement ("almonds");
// REQUIRE (tree.size() == 5);
//
// {
// const auto* a_node = tree.getRootNode().first_child;
// REQUIRE (a_node->tag == "a");
// REQUIRE (a_node->first_child->leaf == "alfalfa");
// REQUIRE (a_node->first_child->next_sibling->leaf == "almonds");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->leaf == "apples");
// }
//
// tree.insertElement ("acai");
// REQUIRE (tree.size() == 6);
//
// {
// const auto* a_node = tree.getRootNode().first_child;
// REQUIRE (a_node->tag == "a");
// REQUIRE (a_node->first_child->leaf == "acai");
// REQUIRE (a_node->first_child->next_sibling->leaf == "alfalfa");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->leaf == "almonds");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->next_sibling->leaf == "apples");
// }
// }
SECTION ("Insertion")
{
tree.insertElement ("almonds");
REQUIRE (tree.size() == 5);

// {
// const auto* a_node = tree.getRootNode().first_child;
// REQUIRE (a_node->tag == "a");
// REQUIRE (a_node->first_child->leaf == "alfalfa");
// REQUIRE (a_node->first_child->next_sibling->leaf == "almonds");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->leaf == "apples");
// }
//
// tree.insertElement ("acai");
// REQUIRE (tree.size() == 6);
//
// {
// const auto* a_node = tree.getRootNode().first_child;
// REQUIRE (a_node->tag == "a");
// REQUIRE (a_node->first_child->leaf == "acai");
// REQUIRE (a_node->first_child->next_sibling->leaf == "alfalfa");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->leaf == "almonds");
// REQUIRE (a_node->first_child->next_sibling->next_sibling->next_sibling->leaf == "apples");
// }
}

// SECTION ("Remove One")
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ TEST_CASE ("Enum Map Test", "[common][data-structures]")
++iter;
}

// iter = 0;
// for (auto [key, val] : map)
// val = (int) iter++;
iter = 0;
for (auto [key, val] : map)
val = static_cast<int> (iter++);
// REQUIRE (map[Food::Apple] == 0);
// REQUIRE (map[Food::Green_Beans] == 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ TEST_CASE ("STL Arena Allocator Test", "[common][data-structures]")

using custom_vector = std::vector<int, Alloc>;
custom_vector vec { { 1, 2, 3, 4 }, alloc };
// REQUIRE (vec.size() == 4);
// REQUIRE (vec.front() == 1);
// REQUIRE (vec.back() == 4);
REQUIRE (vec.size() == 4);
REQUIRE (vec.front() == 1);
REQUIRE (vec.back() == 4);

// vec.push_back (5);
// REQUIRE (vec.size() == 5);
Expand Down

0 comments on commit ffbc2d7

Please sign in to comment.