rename allocator to cig
This commit is contained in:
+1
-1
@@ -2,4 +2,4 @@
|
||||
// the test files are compiled together.
|
||||
|
||||
#define ALLOCATOR_IMPLEMENTATION
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
void *buffer_allocator_alloc(buffer_allocator_t *this, size_t bytes) {
|
||||
size_t new_size = this->size + bytes;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
static void *stdlib_alloc(void *this, size_t bytes, const char *file, int line) {
|
||||
(void)this;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <criterion/criterion.h>
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
#define EXPECT 5
|
||||
Test(borrow_allocator, test) {
|
||||
@@ -11,8 +11,6 @@ Test(borrow_allocator, test) {
|
||||
borrow_allocator_reset(&balloc);
|
||||
cr_assert_eq(0, borrow_allocator_count_allocations(&balloc));
|
||||
borrow_allocator_assert_all_freed(&balloc);
|
||||
void *foobar = malloc(1000);
|
||||
(void)foobar;
|
||||
}
|
||||
|
||||
#define IS_SIZE 900
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <criterion/criterion.h>
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
static void test_buffer_alloc(buffer_allocator_t impl) {
|
||||
allocator_t inter = buffer_allocator_interface(&impl);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <criterion/criterion.h>
|
||||
#include "allocator.h"
|
||||
#include "cig.h"
|
||||
|
||||
|
||||
Test(std_allocator, test) {
|
||||
|
||||
Reference in New Issue
Block a user