1
0
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:
2024-05-20 18:59:42 -04:00
parent 94b0a1561b
commit 0bc03fc4be
4 changed files with 185 additions and 0 deletions

View 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;
};
};

View File

@ -0,0 +1 @@
unit_test( 0 )