Fix one Mallocator test
Test that if the reallocation fails, the pointer doesn't change.
This commit is contained in:
		@@ -154,8 +154,11 @@ final class Mallocator : Allocator
 | 
			
		||||
    // Fails with false.
 | 
			
		||||
    private @nogc nothrow unittest
 | 
			
		||||
    {
 | 
			
		||||
        void[] p;
 | 
			
		||||
        void[] p = Mallocator.instance.allocate(20);
 | 
			
		||||
        void[] oldP = p;
 | 
			
		||||
        assert(!Mallocator.instance.reallocate(p, size_t.max - Mallocator.psize * 2));
 | 
			
		||||
        assert(oldP is p);
 | 
			
		||||
        Mallocator.instance.deallocate(p);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user