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
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc')
-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) \
{ \