first implementation, badly, of allocator

This commit is contained in:
hugogogo
2022-06-01 15:41:14 +02:00
parent 0e51cc655c
commit 99f67b808c
5 changed files with 145 additions and 2 deletions

View File

@@ -4,9 +4,24 @@
#include "tests.h"
#include <vector>
#include "ftvector.hpp"
int main() {
TEST(vector::vector (constructor))
{
ftvector myvector;
int myint[] = {12434, -2432, 12, 5345, 23, 0, -4, 387, 8432, -934723, 1};
int size = sizeof(myint) / sizeof(myint[0]);
for (int i = 0; i < size; i++)
myvector.push_back (myint[i]);
std::cout << "myvector stores " << int(myvector.size()) << " numbers.\n";
}
TESTEND
/*
TEST(vector::vector (constructor))
{
// constructors used in the same order as described above:
@@ -445,6 +460,7 @@ int main() {
myvector.get_allocator().deallocate(p,5);
}
TESTEND
*/
// execute tests and print them :