Blender V5.0
blender::animrig::tests::AnimationEvaluationTest Class Reference

Inherits testing::Test.

Public Member Functions

void SetUp () override
void TearDown () override
std::optional< floatevaluate_single_property (const StringRefNull rna_path, const int array_index, const float eval_time)
testing::AssertionResult test_evaluate_layer (const StringRefNull rna_path, const int array_index, const float2 eval_time__expect_value)
testing::AssertionResult test_evaluate_layer_no_result (const StringRefNull rna_path, const int array_index, const float eval_time)

Static Public Member Functions

static void SetUpTestSuite ()
static void TearDownTestSuite ()

Protected Attributes

Mainbmain
Actionaction
Objectcube
Slotslot
Layerlayer
KeyframeSettings settings = get_keyframe_settings(false)
AnimationEvalContext anim_eval_context = {}
PointerRNA cube_rna_ptr

Detailed Description

Definition at line 32 of file evaluation_test.cc.

Member Function Documentation

◆ evaluate_single_property()

std::optional< float > blender::animrig::tests::AnimationEvaluationTest::evaluate_single_property ( const StringRefNull rna_path,
const int array_index,
const float eval_time )
inline

Evaluate the layer, and return result for the given property.

Definition at line 83 of file evaluation_test.cc.

References action, anim_eval_context, cube_rna_ptr, blender::animrig::internal::evaluate_layer(), layer, result, slot, and blender::animrig::AnimatedProperty::value.

Referenced by test_evaluate_layer(), and test_evaluate_layer_no_result().

◆ SetUp()

void blender::animrig::tests::AnimationEvaluationTest::SetUp ( )
inlineoverride

◆ SetUpTestSuite()

void blender::animrig::tests::AnimationEvaluationTest::SetUpTestSuite ( )
inlinestatic

Definition at line 45 of file evaluation_test.cc.

References BKE_idtype_init(), and CLG_init().

◆ TearDown()

void blender::animrig::tests::AnimationEvaluationTest::TearDown ( )
inlineoverride

Definition at line 77 of file evaluation_test.cc.

References BKE_main_free(), and bmain.

◆ TearDownTestSuite()

void blender::animrig::tests::AnimationEvaluationTest::TearDownTestSuite ( )
inlinestatic

Definition at line 54 of file evaluation_test.cc.

References CLG_exit().

◆ test_evaluate_layer()

testing::AssertionResult blender::animrig::tests::AnimationEvaluationTest::test_evaluate_layer ( const StringRefNull rna_path,
const int array_index,
const float2 eval_time__expect_value )
inline

Evaluate the layer, and test that the given property evaluates to the expected value.

Definition at line 99 of file evaluation_test.cc.

References evaluate_single_property(), and ulp_diff_ff().

◆ test_evaluate_layer_no_result()

testing::AssertionResult blender::animrig::tests::AnimationEvaluationTest::test_evaluate_layer_no_result ( const StringRefNull rna_path,
const int array_index,
const float eval_time )
inline

Evaluate the layer, and test that the given property is not part of the result.

Definition at line 128 of file evaluation_test.cc.

References evaluate_single_property().

Member Data Documentation

◆ action

Action* blender::animrig::tests::AnimationEvaluationTest::action
protected

Definition at line 35 of file evaluation_test.cc.

Referenced by evaluate_single_property(), and SetUp().

◆ anim_eval_context

AnimationEvalContext blender::animrig::tests::AnimationEvaluationTest::anim_eval_context = {}
protected

Definition at line 41 of file evaluation_test.cc.

Referenced by evaluate_single_property().

◆ bmain

Main* blender::animrig::tests::AnimationEvaluationTest::bmain
protected

Definition at line 34 of file evaluation_test.cc.

Referenced by SetUp(), and TearDown().

◆ cube

Object* blender::animrig::tests::AnimationEvaluationTest::cube
protected

Definition at line 36 of file evaluation_test.cc.

Referenced by SetUp().

◆ cube_rna_ptr

PointerRNA blender::animrig::tests::AnimationEvaluationTest::cube_rna_ptr
protected

Definition at line 42 of file evaluation_test.cc.

Referenced by evaluate_single_property(), and SetUp().

◆ layer

Layer* blender::animrig::tests::AnimationEvaluationTest::layer
protected

Definition at line 38 of file evaluation_test.cc.

Referenced by evaluate_single_property(), and SetUp().

◆ settings

KeyframeSettings blender::animrig::tests::AnimationEvaluationTest::settings = get_keyframe_settings(false)
protected

Definition at line 40 of file evaluation_test.cc.

Referenced by SetUp().

◆ slot

Slot* blender::animrig::tests::AnimationEvaluationTest::slot
protected

Definition at line 37 of file evaluation_test.cc.

Referenced by evaluate_single_property(), and SetUp().


The documentation for this class was generated from the following file: