From e36217208802c001f1fbc758e5f103cbc4f339a2 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Sun, 3 Nov 2024 21:07:34 +0100 Subject: add unit tests for math --- src/services/quick-answers/math.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/services/quick-answers/math.h') diff --git a/src/services/quick-answers/math.h b/src/services/quick-answers/math.h index 6bc07fe..c66a2bf 100644 --- a/src/services/quick-answers/math.h +++ b/src/services/quick-answers/math.h @@ -123,22 +123,23 @@ void foobar_math_value_copy ( FoobarMathValue FoobarMathValue* out_value ); void foobar_math_value_free ( FoobarMathValue value ); void foobar_math_value_negate ( FoobarMathValue* value ); -gboolean foobar_math_value_add ( FoobarMathValue lhs, - FoobarMathValue rhs, +gboolean foobar_math_value_add ( FoobarMathValue* lhs, + FoobarMathValue* rhs, FoobarMathValue* out_value ); -gboolean foobar_math_value_sub ( FoobarMathValue lhs, - FoobarMathValue rhs, +gboolean foobar_math_value_sub ( FoobarMathValue* lhs, + FoobarMathValue* rhs, FoobarMathValue* out_value ); -gboolean foobar_math_value_mul ( FoobarMathValue lhs, - FoobarMathValue rhs, +gboolean foobar_math_value_mul ( FoobarMathValue* lhs, + FoobarMathValue* rhs, FoobarMathValue* out_value ); -gboolean foobar_math_value_div ( FoobarMathValue lhs, - FoobarMathValue rhs, +gboolean foobar_math_value_div ( FoobarMathValue* lhs, + FoobarMathValue* rhs, FoobarMathValue* out_value ); -gboolean foobar_math_value_pow ( FoobarMathValue lhs, - FoobarMathValue rhs, +gboolean foobar_math_value_pow ( FoobarMathValue* lhs, + FoobarMathValue* rhs, FoobarMathValue* out_value ); -gboolean foobar_math_value_is_simple_int ( FoobarMathValue value ); +gboolean foobar_math_value_unify_integers ( FoobarMathValue* a, + FoobarMathValue* b ); gchar* foobar_math_value_to_string ( FoobarMathValue value ); long double foobar_math_value_to_float ( FoobarMathValue value ); gboolean foobar_math_evaluate ( FoobarMathExpression const* expr, -- cgit v1.3.1