forked from Alepha/Alepha
Bring in the mockination work and Truss from old.
It's all a mess -- not in the new unified form and namespace. I need to do a big cleanup pass.
This commit is contained in:
39
Truss/memory.test/test1a.cc
Normal file
39
Truss/memory.test/test1a.cc
Normal file
@ -0,0 +1,39 @@
|
||||
#include <Alepha/Truss/memory.h>
|
||||
|
||||
#include <Alepha/assert.h>
|
||||
|
||||
#include <Alepha/Mockination/MockFunction.h>
|
||||
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
inline namespace Test1
|
||||
{
|
||||
static void runTests();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
runTests();
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
static void
|
||||
unique_ptr_to_ref_ptr()
|
||||
{
|
||||
auto p= Alepha::Truss::make_unique< std::string >( "Hello" );
|
||||
Alepha::Truss::ref_ptr< std::string > r= p.get();
|
||||
|
||||
Alepha::Truss::ref_ptr< std::string > r2= r;
|
||||
}
|
||||
|
||||
static void
|
||||
Test1::runTests()
|
||||
{
|
||||
unique_ptr_to_ref_ptr();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user