#include "testing/testing.h"
#include <cstring>
#include "BLI_expr_pylike_eval.hh"
#include "BLI_math_base_c.hh"
#include "BLI_utildefines.hh"
Go to the source code of this file.
|
| #define | TRUE_VAL 1.0 |
| #define | FALSE_VAL 0.0 |
| #define | TEST_PARSE_FAIL(name, str) |
| #define | TEST_CONST(name, str, value) |
| #define | TEST_RESULT(name, str, value) |
| #define | TEST_EVAL(name, str, x, value) |
| #define | TEST_ERROR(name, str, x, code) |
|
| static void | blender::expr_pylike_parse_fail_test (const char *str) |
| static void | blender::expr_pylike_const_test (const char *str, double value, bool force_const) |
| static ExprPyLike_Parsed * | blender::parse_for_eval (const char *str, bool nonconst) |
| static void | blender::verify_eval_result (ExprPyLike_Parsed *expr, double x, double value) |
| static void | blender::expr_pylike_eval_test (const char *str, double x, double value) |
| static void | blender::expr_pylike_error_test (const char *str, double x, eExprPyLike_EvalStatus error) |
| | blender::TEST (expr_pylike, Eval_Ternary1) |
| | blender::TEST (expr_pylike, MultipleArgs) |
| | blender::TEST (expr_pylike, UsingParam) |
| | blender::TEST_ERROR (Mixed1, "sqrt(x) + 1 / max(0, x)", -1.0, EXPR_PYLIKE_MATH_ERROR) TEST_ERROR(Mixed2 |
| | blender::sqrt (x)+1/max(0 |
| EXPR_PYLIKE_DIV_BY_ZERO | blender::TEST_ERROR (Mixed3, "sqrt(x) + 1 / max(0, x)", 1.0, EXPR_PYLIKE_SUCCESS) TEST(expr_pylike |
| | blender::EXPECT_EQ (BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID) |
| | blender::BLI_expr_pylike_free (expr) |
| | blender::TEST (expr_pylike, Error_ArgumentCount) |
◆ FALSE_VAL
◆ TEST_CONST
| #define TEST_CONST |
( |
| name, |
|
|
| str, |
|
|
| value ) |
◆ TEST_ERROR
| #define TEST_ERROR |
( |
| name, |
|
|
| str, |
|
|
| x, |
|
|
| code ) |
◆ TEST_EVAL
| #define TEST_EVAL |
( |
| name, |
|
|
| str, |
|
|
| x, |
|
|
| value ) |
◆ TEST_PARSE_FAIL
| #define TEST_PARSE_FAIL |
( |
| name, |
|
|
| str ) |
◆ TEST_RESULT
| #define TEST_RESULT |
( |
| name, |
|
|
| str, |
|
|
| value ) |
◆ TRUE_VAL