mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 10:38:11 +02:00
Add a basic slab test to cover the memory leak issue found in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38989 and https://gitlab.freedesktop.org/mesa/mesa/-/issues/14396 Test: meson test anv_slab_bo_test. Signed-off-by: hwandy <hwandy@google.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39081>
16 lines
418 B
C++
16 lines
418 B
C++
/*
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include "test_common.h"
|
|
|
|
#define ANV_C_TEST(S, N, C) extern "C" void C(void); TEST(S, N) { C(); }
|
|
|
|
ANV_C_TEST(AnvSlabBo, AllocWithAlignment, anv_slab_bo_alloc_with_alignment);
|
|
|
|
extern "C" void FAIL_IN_GTEST(const char *file_path, unsigned line_number, const char *msg) {
|
|
GTEST_FAIL_AT(file_path, line_number) << msg;
|
|
}
|