Blender  V2.93
Macros | Functions
BLI_array_utils_test.cc File Reference
#include "testing/testing.h"
#include "BLI_array_utils.h"
#include "BLI_utildefines.h"
#include "BLI_utildefines_stack.h"

Go to the source code of this file.

Macros

#define STACK_PUSH_AND_CHECK_FORWARD(v, i)
 
#define STACK_PUSH_AND_CHECK_BACKWARD(v, i)
 
#define STACK_PUSH_AND_CHECK_BOTH(v, i)
 
#define BINARY_AND_TEST(data_cmp, data_a, data_b, data_combine, length)
 
#define BINARY_OR_TEST(data_cmp, data_a, data_b, data_combine, length)
 

Functions

 TEST (array_utils, ReverseStringEmpty)
 
 TEST (array_utils, ReverseStringSingle)
 
 TEST (array_utils, ReverseString4)
 
 TEST (array_utils, ReverseInt4)
 
 TEST (array_utils, FindIndexStringEmpty)
 
 TEST (array_utils, FindIndexStringSingle)
 
 TEST (array_utils, FindIndexStringSingleMissing)
 
 TEST (array_utils, FindIndexString4)
 
 TEST (array_utils, FindIndexInt4)
 
 TEST (array_utils, FindIndexInt4_DupeEnd)
 
 TEST (array_utils, FindIndexInt4_DupeMid)
 
 TEST (array_utils, FindIndexPointer)
 
 TEST (array_utils, BinaryAndInt4Zero)
 
 TEST (array_utils, BinaryAndInt4Mix)
 
 TEST (array_utils, BinaryOrInt4Alternate)
 
 TEST (array_utils, BinaryOrInt4Mix)
 

Macro Definition Documentation

◆ BINARY_AND_TEST

#define BINARY_AND_TEST (   data_cmp,
  data_a,
  data_b,
  data_combine,
  length 
)
Value:
{ \
BLI_array_binary_and(data_combine, data_a, data_b, length); \
EXPECT_EQ_ARRAY(data_cmp, data_combine, length); \
} \
((void)0)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
Definition: btQuaternion.h:895

Definition at line 146 of file BLI_array_utils_test.cc.

◆ BINARY_OR_TEST

#define BINARY_OR_TEST (   data_cmp,
  data_a,
  data_b,
  data_combine,
  length 
)
Value:
{ \
BLI_array_binary_or(data_combine, data_a, data_b, length); \
EXPECT_EQ_ARRAY(data_combine, data_cmp, length); \
} \
((void)0)

Definition at line 171 of file BLI_array_utils_test.cc.

◆ STACK_PUSH_AND_CHECK_BACKWARD

#define STACK_PUSH_AND_CHECK_BACKWARD (   v,
 
)
Value:
{ \
STACK_PUSH(data, v); \
EXPECT_EQ(BLI_array_rfindindex(data, STACK_SIZE(data), &(v)), i); \
} \
((void)0)
#define BLI_array_rfindindex(arr, arr_len, p)
#define STACK_SIZE(stack)
ATTR_WARN_UNUSED_RESULT const BMVert * v

◆ STACK_PUSH_AND_CHECK_BOTH

#define STACK_PUSH_AND_CHECK_BOTH (   v,
 
)
Value:
{ \
STACK_PUSH(data, v); \
EXPECT_EQ(BLI_array_findindex(data, STACK_SIZE(data), &(v)), i); \
EXPECT_EQ(BLI_array_rfindindex(data, STACK_SIZE(data), &(v)), i); \
} \
((void)0)
#define BLI_array_findindex(arr, arr_len, p)

◆ STACK_PUSH_AND_CHECK_FORWARD

#define STACK_PUSH_AND_CHECK_FORWARD (   v,
 
)
Value:
{ \
STACK_PUSH(data, v); \
EXPECT_EQ(BLI_array_findindex(data, STACK_SIZE(data), &(v)), i); \
} \
((void)0)

Function Documentation

◆ TEST() [1/16]

TEST ( array_utils  ,
BinaryAndInt4Mix   
)

Definition at line 161 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, and BINARY_AND_TEST.

◆ TEST() [2/16]

TEST ( array_utils  ,
BinaryAndInt4Zero   
)

Definition at line 153 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, and BINARY_AND_TEST.

◆ TEST() [3/16]

TEST ( array_utils  ,
BinaryOrInt4Alternate   
)

Definition at line 178 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, and BINARY_OR_TEST.

◆ TEST() [4/16]

TEST ( array_utils  ,
BinaryOrInt4Mix   
)

Definition at line 185 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, and BINARY_OR_TEST.

◆ TEST() [5/16]

TEST ( array_utils  ,
FindIndexInt4   
)

◆ TEST() [6/16]

TEST ( array_utils  ,
FindIndexInt4_DupeEnd   
)

◆ TEST() [7/16]

TEST ( array_utils  ,
FindIndexInt4_DupeMid   
)

◆ TEST() [8/16]

TEST ( array_utils  ,
FindIndexPointer   
)

◆ TEST() [9/16]

TEST ( array_utils  ,
FindIndexString4   
)

◆ TEST() [10/16]

TEST ( array_utils  ,
FindIndexStringEmpty   
)

◆ TEST() [11/16]

TEST ( array_utils  ,
FindIndexStringSingle   
)

◆ TEST() [12/16]

TEST ( array_utils  ,
FindIndexStringSingleMissing   
)

◆ TEST() [13/16]

TEST ( array_utils  ,
ReverseInt4   
)

Definition at line 34 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, BLI_array_reverse, and data.

◆ TEST() [14/16]

TEST ( array_utils  ,
ReverseString4   
)

Definition at line 27 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, BLI_array_reverse, and data.

◆ TEST() [15/16]

TEST ( array_utils  ,
ReverseStringEmpty   
)

Definition at line 13 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, BLI_array_reverse, and data.

◆ TEST() [16/16]

TEST ( array_utils  ,
ReverseStringSingle   
)

Definition at line 20 of file BLI_array_utils_test.cc.

References ARRAY_SIZE, BLI_array_reverse, and data.