forked from Alepha/Alepha
Recording how I _want_ it to work.
It looks like the move operation on allocators is actually a copy!
This commit is contained in:
32
Memory/ThreadSlab.test/0.cc
Normal file
32
Memory/ThreadSlab.test/0.cc
Normal file
@ -0,0 +1,32 @@
|
||||
static_assert( __cplusplus > 2020'99 );
|
||||
|
||||
#include "../ThreadSlab.h"
|
||||
|
||||
#include <Alepha/Testing/test.h>
|
||||
|
||||
#include <Alepha/Utility/evaluation_helpers.h>
|
||||
|
||||
static auto init= Alepha::Utility::enroll <=[]
|
||||
{
|
||||
using namespace Alepha::Testing::literals;
|
||||
|
||||
using namespace Alepha::Memory::exports::ThreadSlab_m;
|
||||
using String= ThreadSlabString;
|
||||
|
||||
"Can we work with simple `ThreadSlabStrings` without errors?"_test <=[]
|
||||
{
|
||||
String s;
|
||||
std::cerr << "s is empty" << std::endl;
|
||||
|
||||
String s2= "Hello World";
|
||||
std::cerr << "small hello world string." << std::endl;
|
||||
|
||||
String s3= s2 + ": and bob";
|
||||
std::cerr << "appended..." << std::endl;
|
||||
s3= s3 + s3 + s2;
|
||||
|
||||
s2= std::move( s3 );
|
||||
|
||||
std::cout << s3 << std::endl;
|
||||
};
|
||||
};
|
||||
1
Memory/ThreadSlab.test/CMakeLists.txt
Normal file
1
Memory/ThreadSlab.test/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
unit_test( 0 )
|
||||
Reference in New Issue
Block a user