[gnome-calculator] Highlight 0th root error token when 0th root is calculated.
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] Highlight 0th root error token when 0th root is calculated.
- Date: Mon, 13 Feb 2017 16:48:29 +0000 (UTC)
commit 9cea9c11c02eaa4d563ac8c0a7d5b01e4f435cef
Author: PioneerAxon <arth svnit gmail com>
Date: Wed Jan 4 21:17:33 2017 +0530
Highlight 0th root error token when 0th root is calculated.
This also prevents overwriting errors when perser object has error code
set. As a side-effect of this, now we return correct error (Unknown
variable) when a function is invoked with invalid variable as argument.
https://bugzilla.gnome.org/show_bug.cgi?id=775789
tests/test-equation.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-equation.vala b/tests/test-equation.vala
index 10e2a46..8c663de 100644
--- a/tests/test-equation.vala
+++ b/tests/test-equation.vala
@@ -711,7 +711,7 @@ private void test_custom_functions ()
test ("func(2;3;5)", "0", 0);
test ("func(x;y;z)=abs(x-y)+abs(y-z)+abs(x-z)", "0", 0);
test ("func(1;2;3)", "4", 0);
- test ("func(x;y;z)", "0", ErrorCode.INVALID);
+ test ("func(x;y;z)", "0", ErrorCode.UNKNOWN_VARIABLE);
test ("test(x;y)=func(x;y;x)+func(y;x;y)", "0", 0);
test ("6*test(3;5)+log10", "49", 0);
test ("test(test(5;6);9)", "20", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]