Blender
V4.3
source
blender
depsgraph
intern
builder
deg_builder_rna_test.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2020 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
9
#include "
intern/builder/deg_builder_rna.h
"
10
11
#include "testing/testing.h"
12
13
namespace
blender::deg::tests
{
14
15
class
TestableRNANodeQuery
:
public
RNANodeQuery
{
16
public
:
17
static
bool
contains
(
const
char
*prop_identifier,
const
char
*rna_path_component)
18
{
19
return
RNANodeQuery::contains
(prop_identifier, rna_path_component);
20
}
21
};
22
23
TEST
(deg_builder_rna, contains)
24
{
25
EXPECT_TRUE(
TestableRNANodeQuery::contains
(
"location"
,
"location"
));
26
EXPECT_TRUE(
TestableRNANodeQuery::contains
(
"location.x"
,
"location"
));
27
EXPECT_TRUE(
TestableRNANodeQuery::contains
(
"pose.bone[\"blork\"].location"
,
"location"
));
28
EXPECT_TRUE(
TestableRNANodeQuery::contains
(
"pose.bone[\"blork\"].location.x"
,
"location"
));
29
EXPECT_TRUE(
TestableRNANodeQuery::contains
(
"pose.bone[\"blork\"].location[0]"
,
"location"
));
30
31
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
""
,
"location"
));
32
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"locatio"
,
"location"
));
33
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"locationnn"
,
"location"
));
34
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"test_location"
,
"location"
));
35
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"location_test"
,
"location"
));
36
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"test_location_test"
,
"location"
));
37
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"pose.bone[\"location\"].scale"
,
"location"
));
38
EXPECT_FALSE(
TestableRNANodeQuery::contains
(
"pose.bone[\"location\"].scale[0]"
,
"location"
));
39
}
40
41
}
// namespace blender::deg::tests
blender::deg::RNANodeQuery
Definition
deg_builder_rna.h:58
blender::deg::RNANodeQuery::contains
static bool contains(const char *prop_identifier, const char *rna_path_component)
Definition
deg_builder_rna.cc:133
blender::deg::tests::TestableRNANodeQuery
Definition
deg_builder_rna_test.cc:15
blender::deg::tests::TestableRNANodeQuery::contains
static bool contains(const char *prop_identifier, const char *rna_path_component)
Definition
deg_builder_rna_test.cc:17
deg_builder_rna.h
blender::deg::tests
Definition
deg_builder_rna_test.cc:13
blender::deg::tests::TEST
TEST(deg_builder_rna, contains)
Definition
deg_builder_rna_test.cc:23
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0