3 #include "testing/testing.h"
18 float *array_pt = array_tar + (
size - 1);
21 *(array_pt--) = (
float)i;
38 const char *in =
"test";
53 const int items_total =
SIZE;
55 for (
int in = 0; in < items_total; in++) {
58 for (
int out_test = 0; out_test < items_total; out_test++) {
65 TEST(heap, SimpleRangeReverse)
67 const int items_total =
SIZE;
69 for (
int in = 0; in < items_total; in++) {
72 for (
int out_test = items_total - 1; out_test >= 0; out_test--) {
79 TEST(heap, SimpleDuplicates)
81 const int items_total =
SIZE;
83 for (
int in = 0; in < items_total; in++) {
86 for (
int out_test = 0; out_test < items_total; out_test++) {
96 float *values = (
float *)
MEM_mallocN(
sizeof(
float) * items_total, __func__);
99 for (
int i = 0; i < items_total; i++) {
102 for (
int out_test = 0; out_test < items_total; out_test++) {
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
A min-heap / priority queue ADT.
void BLI_heapsimple_free(HeapSimple *heap, HeapSimpleFreeFP ptrfreefp) ATTR_NONNULL(1)
HeapSimple * BLI_heapsimple_new(void) ATTR_WARN_UNUSED_RESULT
void * BLI_heapsimple_pop_min(HeapSimple *heap) ATTR_NONNULL(1)
bool BLI_heapsimple_is_empty(const HeapSimple *heap) ATTR_NONNULL(1)
uint BLI_heapsimple_len(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_heapsimple_insert(HeapSimple *heap, float value, void *ptr) ATTR_NONNULL(1)
static void random_heapsimple_helper(const int items_total, const int random_seed)
static void range_fl(float *array_tar, const int size)
void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_num, unsigned int seed)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)