refactor: move setup of chapter 2 tests out of main
This commit is contained in:
parent
a3c2e3728c
commit
9dbfc54b76
15 changed files with 38 additions and 26 deletions
5
chapters/chapter_02/include/chapter_2_tests.h
Normal file
5
chapters/chapter_02/include/chapter_2_tests.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "chapter_interface.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
std::vector<std::unique_ptr<ChapterTest>> chapter_2_tests();
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class ConstExpTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "Constexpr test"; }
|
||||
};
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class DelegateConstructor : public ChapterTest {
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override {
|
||||
return "Delegate constructor test";
|
||||
};
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class IfConstexprTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "If constexpr test"; }
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class IfswitchTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "If/switch test"; }
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class InheritanceConstructor : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override {
|
||||
return "Inheritance constructor test";
|
||||
};
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class InitListTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "Initializer list test"; }
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class NullTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "Nullptr test"; }
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class RangeBasedForTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "Range based for test"; }
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class StructuredBindingTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override {
|
||||
return "Structured binding test";
|
||||
}
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class TypeInferenceTest : public ChapterTest {
|
||||
public:
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override { return "Type inference test"; }
|
||||
};
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "chapter_interface.h"
|
||||
|
||||
class VariadicTemplates : public ChapterTest {
|
||||
virtual void run() override;
|
||||
virtual const char *name() const override {
|
||||
return "Variadic templates test";
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue