#include <Ab/Config.hpp>
#include <Ab/Memory.hpp>
#include <Ab/Test/BasicTest.hpp>
#include <gtest/gtest.h>

namespace Ab {
namespace Test {

class TestMemory : public BasicTest {};

TEST_F(TestMemory, initAndKill) {
	Memory m;
	ASSERT_EQ(m.init(Memory::defaultConfig()), MemoryError::SUCCESS);
	m.kill();
}

TEST_F(TestMemory, grow) {
	Memory m;
	m.init(Memory::defaultConfig());
	for (std::size_t i = 0; i < 3; i++) {
		EXPECT_EQ(m.grow(), MemoryError::SUCCESS);
	}
	m.kill();
}

}  // namespace Test
}  // namespace Ab

#include <Ab/Config.hpp>
#include <Ab/Memory.hpp>
#include <Ab/Test/BasicTest.hpp>
#include <gtest/gtest.h>

namespace Ab {
namespace Test {

class TestMemory : public BasicTest {};

TEST_F(TestMemory, initAndKill) {
	Memory m;
	ASSERT_EQ(m.init(Memory::defaultConfig()), MemoryError::SUCCESS);
	m.kill();
}

}  // namespace Test
}  // namespace Ab
--- 
+++ 
@@ -14,5 +14,14 @@
 	m.kill();
 }
 
+TEST_F(TestMemory, grow) {
+	Memory m;
+	m.init(Memory::defaultConfig());
+	for (std::size_t i = 0; i < 3; i++) {
+		EXPECT_EQ(m.grow(), MemoryError::SUCCESS);
+	}
+	m.kill();
+}
+
 }  // namespace Test
 }  // namespace Ab
Add a basic memory grow test

Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>
