Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-01-24 20:48:38 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-01-24 20:48:38 +0300
commit79d9874028ffb91cf90fd547356e58341c843a96 (patch)
treea45c7533dede0d15067a00dbcd15a24ee03fd3f8 /tests
parentdada30f5efc299c5543d996f7f492bb1e975c0f5 (diff)
parentfc1f5bded46afbb9b16fffe9e4c7f7c212566255 (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'tests')
-rw-r--r--tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc b/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
index 32e33e2e118..449577401d7 100644
--- a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
+++ b/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc
@@ -282,6 +282,19 @@ TEST(expr_pylike, MultipleArgs)
BLI_expr_pylike_free(expr);
}
+TEST(expr_pylike, UsingParam)
+{
+ const char *names[3] = {"x", "y", "z"};
+
+ ExprPyLike_Parsed *expr = BLI_expr_pylike_parse("x + z", names, ARRAY_SIZE(names));
+
+ EXPECT_TRUE(BLI_expr_pylike_is_using_param(expr, 0));
+ EXPECT_FALSE(BLI_expr_pylike_is_using_param(expr, 1));
+ EXPECT_TRUE(BLI_expr_pylike_is_using_param(expr, 2));
+
+ BLI_expr_pylike_free(expr);
+}
+
#define TEST_ERROR(name, str, x, code) \
TEST(expr_pylike, Error_##name) \
{ \