Skip to content
Snippets Groups Projects
Commit a9242e6b authored by Alrik Appelfeldt's avatar Alrik Appelfeldt
Browse files

Upload New File

parent b3f19a83
No related branches found
No related tags found
No related merge requests found
#include "catch.hpp"
#include "linked_list.h"
using namespace std;
TEST_CASE("Constructors")
{
SECTION("empty list")
{
List list_object;
CHECK(list_object.List_Is_Empty());
}
}
TEST_CASE("Insert")
{
SECTION("insert single node")
{
List list_object;
list_object.Insert_Node(1);
CHECK(list_object.at(0) == 1);
}
SECTION("insert multiple nodes")
{
List list_object2{4, 6, 7};
CHECK(list_object2.at(0) == 4);
CHECK(list_object2.at(1) == 6);
CHECK(list_object2.at(2) == 7);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment