rename list to list

This commit is contained in:
2023-10-23 17:12:04 +02:00
parent 4cc57586b5
commit c61d7f586e
2 changed files with 10 additions and 10 deletions

View File

@@ -2,8 +2,8 @@
// Created by Stepan Usatiuk on 21.10.2023.
//
#ifndef OS2_LISTQUEUE_HPP
#define OS2_LISTQUEUE_HPP
#ifndef OS2_LIST_HPP
#define OS2_LIST_HPP
#include <atomic>
#include <cstdint>
@@ -12,7 +12,7 @@
#include "serial.hpp"
template<typename T>
class ListQueue {
class List {
public:
struct Node {
T val;
@@ -24,8 +24,8 @@ private:
Node *tail = nullptr;
public:
ListQueue() = default;
~ListQueue() {
List() = default;
~List() {
while (!empty()) {
pop_back();
}
@@ -90,4 +90,4 @@ public:
};
#endif//OS2_LISTQUEUE_HPP
#endif//OS2_LIST_HPP

View File

@@ -5,7 +5,7 @@
#include "TestTemplates.hpp"
#include "ListQueue.hpp"
#include "List.hpp"
#include "PointersCollection.hpp"
#include "SkipList.hpp"
#include "SkipListSet.hpp"
@@ -210,8 +210,8 @@ void test_unique_ptr() {
assert(*ptr == "Hello");
}
void test_list_queue() {
ListQueue<int> lq;
void test_list() {
List<int> lq;
for (int i = 0; i < 5; i++) {
assert(lq.empty());
lq.emplace_front(1);
@@ -264,6 +264,6 @@ int test_templates() {
COWTester cowTester;
cowTester.test();
test_unique_ptr();
test_list_queue();
test_list();
return 0;
}