Blender  V3.3
Typedefs | Functions | Variables
blender::editor::animation::tests Namespace Reference

Typedefs

using KeylistFindFunction = std::function< const ActKeyColumn *(const AnimKeylist *, float)>
 

Functions

static void build_fcurve (FCurve &fcurve)
 
static AnimKeylistcreate_test_keylist ()
 
static void assert_act_key_column (const ActKeyColumn *column, const std::optional< float > expected_frame)
 
static float check_keylist_find_range (const AnimKeylist *keylist, KeylistFindFunction keylist_find_func, const float frame_from, const float frame_to, const std::optional< float > expected_frame)
 
static float check_keylist_find_next_range (const AnimKeylist *keylist, const float frame_from, const float frame_to, const std::optional< float > expected_frame)
 
 TEST (keylist, find_next)
 
static float check_keylist_find_prev_range (const AnimKeylist *keylist, const float frame_from, const float frame_to, const std::optional< float > expected_frame)
 
 TEST (keylist, find_prev)
 
static float check_keylist_find_exact_range (const AnimKeylist *keylist, const float frame_from, const float frame_to, const std::optional< float > expected_frame)
 
 TEST (keylist, find_exact)
 

Variables

const float KEYLIST_NEAR_ERROR = 0.1
 
const float FRAME_STEP = 0.005
 

Typedef Documentation

◆ KeylistFindFunction

Definition at line 62 of file keyframes_keylist_test.cc.

Function Documentation

◆ assert_act_key_column()

static void blender::editor::animation::tests::assert_act_key_column ( const ActKeyColumn column,
const std::optional< float expected_frame 
)
static

Definition at line 50 of file keyframes_keylist_test.cc.

References ActKeyColumn::cfra, EXPECT_EQ(), and KEYLIST_NEAR_ERROR.

Referenced by check_keylist_find_range().

◆ build_fcurve()

static void blender::editor::animation::tests::build_fcurve ( FCurve fcurve)
static

Definition at line 24 of file keyframes_keylist_test.cc.

References FCurve::bezt, MEM_callocN, FCurve::totvert, and BezTriple::vec.

Referenced by create_test_keylist().

◆ check_keylist_find_exact_range()

static float blender::editor::animation::tests::check_keylist_find_exact_range ( const AnimKeylist keylist,
const float  frame_from,
const float  frame_to,
const std::optional< float expected_frame 
)
static

Definition at line 120 of file keyframes_keylist_test.cc.

References check_keylist_find_range(), and ED_keylist_find_exact().

Referenced by TEST().

◆ check_keylist_find_next_range()

static float blender::editor::animation::tests::check_keylist_find_next_range ( const AnimKeylist keylist,
const float  frame_from,
const float  frame_to,
const std::optional< float expected_frame 
)
static

Definition at line 78 of file keyframes_keylist_test.cc.

References check_keylist_find_range(), and ED_keylist_find_next().

Referenced by TEST().

◆ check_keylist_find_prev_range()

static float blender::editor::animation::tests::check_keylist_find_prev_range ( const AnimKeylist keylist,
const float  frame_from,
const float  frame_to,
const std::optional< float expected_frame 
)
static

Definition at line 99 of file keyframes_keylist_test.cc.

References check_keylist_find_range(), and ED_keylist_find_prev().

Referenced by TEST().

◆ check_keylist_find_range()

static float blender::editor::animation::tests::check_keylist_find_range ( const AnimKeylist keylist,
KeylistFindFunction  keylist_find_func,
const float  frame_from,
const float  frame_to,
const std::optional< float expected_frame 
)
static

◆ create_test_keylist()

static AnimKeylist* blender::editor::animation::tests::create_test_keylist ( )
static

◆ TEST() [1/3]

blender::editor::animation::tests::TEST ( keylist  ,
find_exact   
)

◆ TEST() [2/3]

blender::editor::animation::tests::TEST ( keylist  ,
find_next   
)

◆ TEST() [3/3]

blender::editor::animation::tests::TEST ( keylist  ,
find_prev   
)

Variable Documentation

◆ FRAME_STEP

const float blender::editor::animation::tests::FRAME_STEP = 0.005

Definition at line 22 of file keyframes_keylist_test.cc.

Referenced by check_keylist_find_range().

◆ KEYLIST_NEAR_ERROR

const float blender::editor::animation::tests::KEYLIST_NEAR_ERROR = 0.1

Definition at line 21 of file keyframes_keylist_test.cc.

Referenced by assert_act_key_column().