do not use macro for suite name

Sat, 16 Apr 2022 08:59:51 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 16 Apr 2022 08:59:51 +0200
changeset 513
b66532b5d8db
parent 512
096d206b63f9
child 514
6f9d97a53d67

do not use macro for suite name

test/test_allocator.cpp file | annotate | diff | comparison | revisions
--- a/test/test_allocator.cpp	Sat Apr 16 08:58:27 2022 +0200
+++ b/test/test_allocator.cpp	Sat Apr 16 08:59:51 2022 +0200
@@ -29,20 +29,18 @@
 #include "cx/allocator.h"
 #include <gtest/gtest.h>
 
-#define SUITE_NAME Allocator
-
-TEST(SUITE_NAME, DefaultAllocator) {
+TEST(Allocator, DefaultAllocator) {
     cx_allocator_class *clazz = cxDefaultAllocator->cl;
     ASSERT_NE(clazz, nullptr);
 }
 
-TEST(SUITE_NAME, DefaultMalloc) {
+TEST(Allocator, DefaultMalloc) {
     void *test = cxMalloc(cxDefaultAllocator, 16);
     ASSERT_NE(test, nullptr);
     free(test);
 }
 
-TEST(SUITE_NAME, DefaultRealloc) {
+TEST(Allocator, DefaultRealloc) {
     void *test = calloc(8, 1);
     memcpy(test, "Test", 5);
     test = cxRealloc(cxDefaultAllocator, test, 16);
@@ -51,7 +49,7 @@
     free(test);
 }
 
-TEST(SUITE_NAME, Reallocate) {
+TEST(Allocator, Reallocate) {
     void *test = calloc(8, 1);
     memcpy(test, "Test", 5);
     int ret = cxReallocate(cxDefaultAllocator, &test, 16);
@@ -61,14 +59,14 @@
     free(test);
 }
 
-TEST(SUITE_NAME, DefaultCalloc) {
+TEST(Allocator, DefaultCalloc) {
     char *test = reinterpret_cast<char *>(cxCalloc(cxDefaultAllocator, 8, 2));
     ASSERT_NE(test, nullptr);
     for (int i = 0; i < 16; i++) ASSERT_EQ(test[i], 0);
     free(test);
 }
 
-TEST(SUITE_NAME, DefaultFree) {
+TEST(Allocator, DefaultFree) {
     void *test = malloc(16);
     EXPECT_NO_FATAL_FAILURE(
             cxFree(cxDefaultAllocator, test);

mercurial