Compare commits
No commits in common. "c4a9ee1fabcf93275a39fe63f3d3ebeb1434d1cc" and "ce448f06deb0aa6a0d54eba93ad6f289c455c451" have entirely different histories.
c4a9ee1fab
...
ce448f06de
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "cpp/vendor/spdlog"]
|
|
||||||
path = cpp/vendor/spdlog
|
|
||||||
url = https://github.com/gabime/spdlog
|
|
@ -1,10 +1,7 @@
|
|||||||
# GED Engine Snippets
|
# GED Engine Snippets
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
Run `scons` in the root directory. This will generate two things:
|
Run `scons` in the root directory. This will generate the shared library as well as executables which run tests.
|
||||||
|
|
||||||
1. the shared library in `lib/`
|
|
||||||
2. test binaries in `test/bin/` which use the library created in step 1
|
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
The `scons` command also generates a `compile_commands.json` which can be used by the VSCodium extension `clangd` for autocompletion, debugging, etc.
|
The `scons` command also generates a `compile_commands.json` which can be used by the VSCodium extension `clangd` for autocompletion, debugging, etc.
|
||||||
|
47
SConstruct
47
SConstruct
@ -1,50 +1,15 @@
|
|||||||
#!python
|
#!python
|
||||||
|
|
||||||
# General utility functions
|
|
||||||
def add_third_party_includes(env):
|
|
||||||
env.Append(CPPPATH=['cpp/', 'cpp/vendor/spdlog/include'])
|
|
||||||
|
|
||||||
|
|
||||||
def add_strict_compile_flags(env):
|
|
||||||
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Werror", "-pedantic"])
|
|
||||||
|
|
||||||
|
|
||||||
# Create the environment and create a Compilation Database for use in VSCodium
|
# Create the environment and create a Compilation Database for use in VSCodium
|
||||||
env = Environment(tools=['default', 'compilation_db'])
|
env = DefaultEnvironment(tools=['default', 'compilation_db'])
|
||||||
env.CompilationDatabase()
|
env.CompilationDatabase()
|
||||||
|
|
||||||
env.Append(CPPPATH=['cpp/', 'include/'])
|
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Werror", "-pedantic"])
|
||||||
|
env.Append(CPPPATH=['.', 'include'])
|
||||||
add_third_party_includes(env)
|
|
||||||
add_strict_compile_flags(env)
|
|
||||||
|
|
||||||
# Build the library
|
|
||||||
gedeng = env.SharedLibrary('lib/gedeng', Glob('cpp/*.cpp'))
|
|
||||||
|
|
||||||
# Install the library to the test application's build directory
|
|
||||||
env.Install('test/bin/lib/', gedeng)
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Test environment setup
|
|
||||||
testEnv = Environment(tools=['default'])
|
|
||||||
|
|
||||||
testEnv.Append(CPPPATH=['include/', 'test/'])
|
|
||||||
|
|
||||||
# Link to the Gedeng library
|
|
||||||
testEnv.Append(LIBPATH=['lib/'])
|
|
||||||
testEnv.Append(LIBS=['gedeng'])
|
|
||||||
|
|
||||||
# Make the test executables search for the gedeng lib in their ./lib folder
|
|
||||||
testEnv.Append(LINKFLAGS=[
|
|
||||||
'-Wl,--disable-new-dtags,-rpath,\'$$ORIGIN/lib/\''
|
|
||||||
])
|
|
||||||
|
|
||||||
add_third_party_includes(testEnv)
|
|
||||||
add_strict_compile_flags(testEnv)
|
|
||||||
|
|
||||||
# Build the test programs
|
# Build the test programs
|
||||||
catch_cpp = "test/catch_amalgamated.cpp"
|
catch_cpp = "test/catch_amalgamated.cpp"
|
||||||
testEnv.Program('test/bin/vector-test.out', [catch_cpp, 'test/vector/vector-test.cpp'])
|
Program('vector-test.out', [catch_cpp, 'test/vector-test.cpp'])
|
||||||
|
|
||||||
testEnv.Program('test/bin/test-app.out', Glob('test/test-app/*.cpp'))
|
# Build the library
|
||||||
|
SharedLibrary('ged', Glob('cpp/*.cpp'))
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
#include "Gedeng/Application.h"
|
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
void Application::run() {
|
|
||||||
while (true) {
|
|
||||||
// TODO: Implement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
@ -1,21 +1,6 @@
|
|||||||
#include "Gedeng/Logger.h"
|
#include "Logger.h"
|
||||||
#include "spdlog/common.h"
|
#include <iostream>
|
||||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
|
||||||
#include "spdlog/spdlog.h"
|
|
||||||
|
|
||||||
namespace Gedeng {
|
void Logger::debug(const String &text) {
|
||||||
|
std::cout << "Debug: " << text << std::endl;
|
||||||
std::shared_ptr<spdlog::logger> Logger::core_logger;
|
|
||||||
std::shared_ptr<spdlog::logger> Logger::client_logger;
|
|
||||||
|
|
||||||
void Logger::init() {
|
|
||||||
spdlog::set_pattern("%^[%T] %n: %v%$");
|
|
||||||
|
|
||||||
core_logger = spdlog::stdout_color_mt("GEDENG");
|
|
||||||
core_logger->set_level(spdlog::level::trace);
|
|
||||||
|
|
||||||
client_logger = spdlog::stdout_color_mt("APP");
|
|
||||||
client_logger->set_level(spdlog::level::trace);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include "Gedeng/String.h"
|
#include "String.h"
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
String::String() : String("") {
|
String::String() : String("") {
|
||||||
}
|
}
|
||||||
@ -118,6 +116,4 @@ const char *String::c_str() const {
|
|||||||
|
|
||||||
size_t String::getLength() const {
|
size_t String::getLength() const {
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
1
cpp/vendor/spdlog
vendored
1
cpp/vendor/spdlog
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 44e1f9f6829cd8acbfea282d390560452e889aff
|
|
@ -1,8 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Gedeng/Application.h"
|
|
||||||
#include "Gedeng/Logger.h"
|
|
||||||
#include "Gedeng/String.h"
|
|
||||||
#include "Gedeng/Vector.h"
|
|
||||||
|
|
||||||
#include "Gedeng/EntryPoint.h"
|
|
@ -1,18 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
class Application {
|
|
||||||
public:
|
|
||||||
Application() = default;
|
|
||||||
|
|
||||||
// Virtual since this class will be inherited by user-created applications
|
|
||||||
virtual ~Application() = default;
|
|
||||||
|
|
||||||
void run();
|
|
||||||
};
|
|
||||||
|
|
||||||
// To be defined in client applications
|
|
||||||
Application *create_application();
|
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
@ -1 +0,0 @@
|
|||||||
#pragma once
|
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Gedeng/Application.h"
|
|
||||||
|
|
||||||
extern Gedeng::Application *Gedeng::create_application();
|
|
||||||
|
|
||||||
// If the user program defines GEDENG_MAIN, supply this main function
|
|
||||||
#ifdef GEDENG_MAIN
|
|
||||||
int main() {
|
|
||||||
// Initialize logging
|
|
||||||
Gedeng::Logger::init();
|
|
||||||
GG_CORE_WARN("Logger initialized");
|
|
||||||
|
|
||||||
Gedeng::Application *app = Gedeng::create_application();
|
|
||||||
|
|
||||||
app->run();
|
|
||||||
|
|
||||||
delete app;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -1,49 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Gedeng/String.h"
|
|
||||||
#include "spdlog/spdlog.h"
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
class Logger {
|
|
||||||
public:
|
|
||||||
static void init();
|
|
||||||
|
|
||||||
inline static std::shared_ptr<spdlog::logger> &get_core_logger() {
|
|
||||||
return core_logger;
|
|
||||||
}
|
|
||||||
inline static std::shared_ptr<spdlog::logger> &get_client_logger() {
|
|
||||||
return client_logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void debug(const String &text);
|
|
||||||
|
|
||||||
private:
|
|
||||||
static std::shared_ptr<spdlog::logger> core_logger;
|
|
||||||
static std::shared_ptr<spdlog::logger> client_logger;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
||||||
|
|
||||||
// Core log macros
|
|
||||||
#define GG_CORE_FATAL(...) \
|
|
||||||
::Gedeng::Logger::get_core_logger()->fatal(__VA_ARGS__)
|
|
||||||
#define GG_CORE_ERROR(...) \
|
|
||||||
::Gedeng::Logger::get_core_logger()->error(__VA_ARGS__)
|
|
||||||
#define GG_CORE_WARN(...) ::Gedeng::Logger::get_core_logger()->warn(__VA_ARGS__)
|
|
||||||
#define GG_CORE_INFO(...) ::Gedeng::Logger::get_core_logger()->info(__VA_ARGS__)
|
|
||||||
#define GG_CORE_TRACE(...) \
|
|
||||||
::Gedeng::Logger::get_core_logger()->trace(__VA_ARGS__)
|
|
||||||
|
|
||||||
// Client log macros
|
|
||||||
#define GG_CLIENT_FATAL(...) \
|
|
||||||
::Gedeng::Logger::get_client_logger()->fatal(__VA_ARGS__)
|
|
||||||
#define GG_CLIENT_ERROR(...) \
|
|
||||||
::Gedeng::Logger::get_client_logger()->error(__VA_ARGS__)
|
|
||||||
#define GG_CLIENT_WARN(...) \
|
|
||||||
::Gedeng::Logger::get_client_logger()->warn(__VA_ARGS__)
|
|
||||||
#define GG_CLIENT_INFO(...) \
|
|
||||||
::Gedeng::Logger::get_client_logger()->info(__VA_ARGS__)
|
|
||||||
#define GG_CLIENT_TRACE(...) \
|
|
||||||
::Gedeng::Logger::get_client_logger()->trace(__VA_ARGS__)
|
|
5
include/Logger.h
Normal file
5
include/Logger.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "String.h"
|
||||||
|
|
||||||
|
class Logger {
|
||||||
|
static void debug(const String &text);
|
||||||
|
};
|
@ -1,9 +1,5 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
class String {
|
class String {
|
||||||
public:
|
public:
|
||||||
/// Create a new empty String
|
/// Create a new empty String
|
||||||
@ -54,6 +50,4 @@ class String {
|
|||||||
size_t length;
|
size_t length;
|
||||||
|
|
||||||
char *text;
|
char *text;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
@ -1,11 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace Gedeng {
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class Vector {
|
class Vector {
|
||||||
public:
|
public:
|
||||||
@ -217,5 +214,3 @@ class Vector {
|
|||||||
data = new_data;
|
data = new_data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Gedeng
|
|
@ -1,15 +0,0 @@
|
|||||||
#include "Gedeng/Logger.h"
|
|
||||||
#define GEDENG_MAIN
|
|
||||||
#include <Gedeng.h>
|
|
||||||
|
|
||||||
class TestApp : public Gedeng::Application {
|
|
||||||
public:
|
|
||||||
TestApp() = default;
|
|
||||||
|
|
||||||
~TestApp() = default;
|
|
||||||
};
|
|
||||||
|
|
||||||
Gedeng::Application *Gedeng::create_application() {
|
|
||||||
GG_CLIENT_INFO("Creating Application");
|
|
||||||
return new TestApp();
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
#include <Gedeng.h>
|
#include "Vector.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this
|
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this
|
||||||
@ -6,7 +6,7 @@
|
|||||||
#include "catch_amalgamated.hpp"
|
#include "catch_amalgamated.hpp"
|
||||||
|
|
||||||
SCENARIO("Vector size and length are correct", "[vector]") {
|
SCENARIO("Vector size and length are correct", "[vector]") {
|
||||||
Gedeng::Vector<int> v(20);
|
Vector<int> v(20);
|
||||||
v.push_back(1);
|
v.push_back(1);
|
||||||
|
|
||||||
REQUIRE(v.size() == 1);
|
REQUIRE(v.size() == 1);
|
||||||
@ -15,7 +15,7 @@ SCENARIO("Vector size and length are correct", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("The bracket operator returns the correct element", "[vector]") {
|
SCENARIO("The bracket operator returns the correct element", "[vector]") {
|
||||||
GIVEN("A vector with some elements") {
|
GIVEN("A vector with some elements") {
|
||||||
Gedeng::Vector<int> v(20);
|
Vector<int> v(20);
|
||||||
v.push_back(1);
|
v.push_back(1);
|
||||||
v.push_back(2);
|
v.push_back(2);
|
||||||
v.push_back(3);
|
v.push_back(3);
|
||||||
@ -32,8 +32,8 @@ SCENARIO("The bracket operator returns the correct element", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("Equality is returned correctly", "[vector]") {
|
SCENARIO("Equality is returned correctly", "[vector]") {
|
||||||
GIVEN("Two vectors with the same items") {
|
GIVEN("Two vectors with the same items") {
|
||||||
Gedeng::Vector<int> v1;
|
Vector<int> v1;
|
||||||
Gedeng::Vector<int> v2;
|
Vector<int> v2;
|
||||||
|
|
||||||
v1.push_back(1);
|
v1.push_back(1);
|
||||||
v2.push_back(1);
|
v2.push_back(1);
|
||||||
@ -54,8 +54,8 @@ SCENARIO("Equality is returned correctly", "[vector]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GIVEN("Two vectors with different items") {
|
GIVEN("Two vectors with different items") {
|
||||||
Gedeng::Vector<int> v1;
|
Vector<int> v1;
|
||||||
Gedeng::Vector<int> v2;
|
Vector<int> v2;
|
||||||
|
|
||||||
v1.push_back(1);
|
v1.push_back(1);
|
||||||
v2.push_back(2);
|
v2.push_back(2);
|
||||||
@ -79,8 +79,8 @@ SCENARIO("Equality is returned correctly", "[vector]") {
|
|||||||
SCENARIO("Erasing an item removes it and moves the following ones forward",
|
SCENARIO("Erasing an item removes it and moves the following ones forward",
|
||||||
"[vector]") {
|
"[vector]") {
|
||||||
GIVEN("Two vectors with almost identical items") {
|
GIVEN("Two vectors with almost identical items") {
|
||||||
Gedeng::Vector<int> v1;
|
Vector<int> v1;
|
||||||
Gedeng::Vector<int> v2;
|
Vector<int> v2;
|
||||||
|
|
||||||
v1.push_back(1);
|
v1.push_back(1);
|
||||||
v2.push_back(1);
|
v2.push_back(1);
|
||||||
@ -117,8 +117,8 @@ SCENARIO("Erasing an item removes it and moves the following ones forward",
|
|||||||
|
|
||||||
SCENARIO("Copy Assignment", "[vector]") {
|
SCENARIO("Copy Assignment", "[vector]") {
|
||||||
GIVEN("Two vectors with identical items") {
|
GIVEN("Two vectors with identical items") {
|
||||||
Gedeng::Vector<int> v1;
|
Vector<int> v1;
|
||||||
Gedeng::Vector<int> v2;
|
Vector<int> v2;
|
||||||
|
|
||||||
v1.push_back(1);
|
v1.push_back(1);
|
||||||
v2.push_back(1);
|
v2.push_back(1);
|
||||||
@ -130,7 +130,7 @@ SCENARIO("Copy Assignment", "[vector]") {
|
|||||||
REQUIRE(v2.size() == 2);
|
REQUIRE(v2.size() == 2);
|
||||||
|
|
||||||
WHEN("Copy assigning the second vector to a third vector") {
|
WHEN("Copy assigning the second vector to a third vector") {
|
||||||
Gedeng::Vector<int> v3;
|
Vector<int> v3;
|
||||||
v3 = v2;
|
v3 = v2;
|
||||||
|
|
||||||
THEN("All vectors should be identical") {
|
THEN("All vectors should be identical") {
|
||||||
@ -143,8 +143,8 @@ SCENARIO("Copy Assignment", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("Move Assignment", "[vector]") {
|
SCENARIO("Move Assignment", "[vector]") {
|
||||||
GIVEN("Two vectors with identical items") {
|
GIVEN("Two vectors with identical items") {
|
||||||
Gedeng::Vector<int> v1;
|
Vector<int> v1;
|
||||||
Gedeng::Vector<int> v2;
|
Vector<int> v2;
|
||||||
|
|
||||||
v1.push_back(1);
|
v1.push_back(1);
|
||||||
v2.push_back(1);
|
v2.push_back(1);
|
||||||
@ -156,7 +156,7 @@ SCENARIO("Move Assignment", "[vector]") {
|
|||||||
REQUIRE(v2.size() == 2);
|
REQUIRE(v2.size() == 2);
|
||||||
|
|
||||||
WHEN("Move assigning the second vector to a third vector") {
|
WHEN("Move assigning the second vector to a third vector") {
|
||||||
Gedeng::Vector<int> v3;
|
Vector<int> v3;
|
||||||
v3 = std::move(v2);
|
v3 = std::move(v2);
|
||||||
|
|
||||||
THEN("The first and third vector should be identical") {
|
THEN("The first and third vector should be identical") {
|
||||||
@ -169,7 +169,7 @@ SCENARIO("Move Assignment", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("Reserve additional space", "[vector]") {
|
SCENARIO("Reserve additional space", "[vector]") {
|
||||||
GIVEN("A vector with a given length") {
|
GIVEN("A vector with a given length") {
|
||||||
Gedeng::Vector<int> v(5);
|
Vector<int> v(5);
|
||||||
|
|
||||||
REQUIRE(v.length() == 5);
|
REQUIRE(v.length() == 5);
|
||||||
|
|
||||||
@ -185,13 +185,13 @@ SCENARIO("Reserve additional space", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("Resizing a vector", "[vector]") {
|
SCENARIO("Resizing a vector", "[vector]") {
|
||||||
GIVEN("A vector with 3 items") {
|
GIVEN("A vector with 3 items") {
|
||||||
Gedeng::Vector<int> v;
|
Vector<int> v;
|
||||||
|
|
||||||
v.push_back(1);
|
v.push_back(1);
|
||||||
v.push_back(2);
|
v.push_back(2);
|
||||||
v.push_back(3);
|
v.push_back(3);
|
||||||
|
|
||||||
Gedeng::Vector<int> target;
|
Vector<int> target;
|
||||||
|
|
||||||
target.push_back(1);
|
target.push_back(1);
|
||||||
target.push_back(2);
|
target.push_back(2);
|
||||||
@ -256,7 +256,7 @@ SCENARIO("Non-default constructor", "[vector]") {
|
|||||||
};
|
};
|
||||||
|
|
||||||
WHEN("Creating a vector and adding an element") {
|
WHEN("Creating a vector and adding an element") {
|
||||||
Gedeng::Vector<NonDefault> non_default_vector;
|
Vector<NonDefault> non_default_vector;
|
||||||
|
|
||||||
non_default_vector.push_back(NonDefault(1));
|
non_default_vector.push_back(NonDefault(1));
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ SCENARIO("Non-default constructor", "[vector]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WHEN("Creating a vector and resizing it") {
|
WHEN("Creating a vector and resizing it") {
|
||||||
Gedeng::Vector<NonDefault> non_default_vector;
|
Vector<NonDefault> non_default_vector;
|
||||||
|
|
||||||
non_default_vector.resize(50, NonDefault(42));
|
non_default_vector.resize(50, NonDefault(42));
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ SCENARIO("Non-default constructor", "[vector]") {
|
|||||||
|
|
||||||
SCENARIO("Erase by swap", "[vector]") {
|
SCENARIO("Erase by swap", "[vector]") {
|
||||||
GIVEN("A vector with some elements") {
|
GIVEN("A vector with some elements") {
|
||||||
Gedeng::Vector<int> v(3);
|
Vector<int> v(3);
|
||||||
v.push_back(1);
|
v.push_back(1);
|
||||||
v.push_back(2);
|
v.push_back(2);
|
||||||
v.push_back(3);
|
v.push_back(3);
|
||||||
@ -330,7 +330,7 @@ class ReferenceCounter {
|
|||||||
SCENARIO("Constructors and Destructors are called as expected", "[vector]") {
|
SCENARIO("Constructors and Destructors are called as expected", "[vector]") {
|
||||||
GIVEN("A vector with a custom reference-counting class") {
|
GIVEN("A vector with a custom reference-counting class") {
|
||||||
|
|
||||||
Gedeng::Vector<ReferenceCounter> v(3);
|
Vector<ReferenceCounter> v(3);
|
||||||
v.push_back(ReferenceCounter());
|
v.push_back(ReferenceCounter());
|
||||||
v.push_back(ReferenceCounter());
|
v.push_back(ReferenceCounter());
|
||||||
v.push_back(ReferenceCounter());
|
v.push_back(ReferenceCounter());
|
||||||
@ -370,7 +370,7 @@ SCENARIO("Constructors and Destructors are called as expected", "[vector]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WHEN("Move-constructing another vector") {
|
WHEN("Move-constructing another vector") {
|
||||||
Gedeng::Vector<ReferenceCounter> v2 = std::move(v);
|
Vector<ReferenceCounter> v2 = std::move(v);
|
||||||
|
|
||||||
THEN("The reference count should have remained the same") {
|
THEN("The reference count should have remained the same") {
|
||||||
REQUIRE(count == 3);
|
REQUIRE(count == 3);
|
Loading…
x
Reference in New Issue
Block a user