feat: add input_number function
This commit is contained in:
parent
bcaf2cb3b7
commit
d562af9876
8 changed files with 61 additions and 11 deletions
|
|
@ -68,6 +68,10 @@ void test_evaluation()
|
|||
evaluate(state, "(cos(2)^2)+(sin(2)^2)", &resVal, &resType);
|
||||
assert(resType == TYPE_FLOAT);
|
||||
assert(float_almost_equal(1, get_float_from_int_rep(resVal)));
|
||||
|
||||
evaluate(state, "get_pi()", &resVal, &resType);
|
||||
assert(resType == TYPE_FLOAT);
|
||||
assert(float_almost_equal(3.14159, get_float_from_int_rep(resVal)));
|
||||
|
||||
evaluate(state, "random_int(1, 100)", &resVal, &resType);
|
||||
assert(resType == TYPE_INT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue