[gnome-calculator] GCalc: renamed Multiply to MathMultiply



commit 678077048ada79884a0016baf79fe1faa447ad8c
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 17 12:18:33 2019 -0500

    GCalc: renamed Multiply to MathMultiply

 gcalc/gcalc-gmultiply.vala                             |  2 +-
 .../{gcalc-multiply.vala => gcalc-math-multiply.vala}  |  2 +-
 gcalc/gcalc-term.vala                                  |  2 +-
 gcalc/meson.build                                      |  2 +-
 tests/gcalc-parsing.vala                               | 18 +++++++++---------
 5 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gcalc/gcalc-gmultiply.vala b/gcalc/gcalc-gmultiply.vala
index 31931537..ca4f8475 100644
--- a/gcalc/gcalc-gmultiply.vala
+++ b/gcalc/gcalc-gmultiply.vala
@@ -18,7 +18,7 @@
  * Authors:
  *      Daniel Espinosa <esodan gmail com>
  */
-public class GCalc.GMultiply : Expression, MathOperator, MathBinaryOperator, Multiply {
+public class GCalc.GMultiply : Expression, MathOperator, MathBinaryOperator, MathMultiply {
   internal override string to_string () {
     return "*";
   }
diff --git a/gcalc/gcalc-multiply.vala b/gcalc/gcalc-math-multiply.vala
similarity index 89%
rename from gcalc/gcalc-multiply.vala
rename to gcalc/gcalc-math-multiply.vala
index 200040a8..6603bc26 100644
--- a/gcalc/gcalc-multiply.vala
+++ b/gcalc/gcalc-math-multiply.vala
@@ -21,5 +21,5 @@
 /**
  * A multiply operator in a math expression
  */
-public interface GCalc.Multiply : Object, MathExpression, MathOperator, MathBinaryOperator {}
+public interface GCalc.MathMultiply : Object, MathExpression, MathOperator, MathBinaryOperator {}
 
diff --git a/gcalc/gcalc-term.vala b/gcalc/gcalc-term.vala
index d8c0517b..66223432 100644
--- a/gcalc/gcalc-term.vala
+++ b/gcalc/gcalc-term.vala
@@ -100,7 +100,7 @@ public interface GCalc.Term : Object, MathExpression {
     if (op is MathMinus) {
       res = c1.multiply (c2);
     }
-    if (op is Multiply) {
+    if (op is MathMultiply) {
       res = c1.multiply (c2);
     }
     if (op is MathDivision) {
diff --git a/gcalc/meson.build b/gcalc/meson.build
index 3d87f778..202af2aa 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -101,11 +101,11 @@ gcalc_sources = files([
        'gcalc-math-function.vala',
        'gcalc-math-group.vala',
        'gcalc-math-minus.vala',
+       'gcalc-math-multiply.vala',
        'gcalc-math-operator.vala',
        'gcalc-math-parameter.vala',
        'gcalc-math-polynomial.vala',
        'gcalc-minus.vala',
-       'gcalc-multiply.vala',
        'gcalc-parameter.vala',
        'gcalc-parser.vala',
        'gcalc-plus.vala',
diff --git a/tests/gcalc-parsing.vala b/tests/gcalc-parsing.vala
index 3ee7c9af..0346913f 100644
--- a/tests/gcalc-parsing.vala
+++ b/tests/gcalc-parsing.vala
@@ -332,7 +332,7 @@ class Tests {
         assert (t1.expressions.get_n_items () == 3);
         var c1 = t1.expressions.get_item (0) as MathConstant;
         assert (c1 != null);
-        var m = t1.expressions.get_item (1) as Multiply;
+        var m = t1.expressions.get_item (1) as MathMultiply;
         assert (m != null);
         var c2 = t1.expressions.get_item (2) as MathConstant;
         assert (c2 != null);
@@ -359,7 +359,7 @@ class Tests {
         assert (t1.expressions.get_n_items () == 3);
         var c1 = t1.expressions.get_item (0) as Variable;
         assert (c1 != null);
-        var m = t1.expressions.get_item (1) as Multiply;
+        var m = t1.expressions.get_item (1) as MathMultiply;
         assert (m != null);
         var c2 = t1.expressions.get_item (2) as Variable;
         assert (c2 != null);
@@ -388,7 +388,7 @@ class Tests {
         assert (minus != null);
         var c1 = t1.expressions.get_item (1) as MathConstant;
         assert (c1 != null);
-        var m1 = t1.expressions.get_item (2) as Multiply;
+        var m1 = t1.expressions.get_item (2) as MathMultiply;
         assert (m1 != null);
         var c2 = t1.expressions.get_item (3) as Variable;
         assert (c2 != null);
@@ -399,7 +399,7 @@ class Tests {
         assert (plus != null);
         var c3 = t2.expressions.get_item (1) as MathConstant;
         assert (c3 != null);
-        var m2 = t2.expressions.get_item (2) as Multiply;
+        var m2 = t2.expressions.get_item (2) as MathMultiply;
         assert (m2 != null);
         var c4 = t2.expressions.get_item (3) as Variable;
         assert (c4 != null);
@@ -492,7 +492,7 @@ class Tests {
         assert (plus != null);
         var c3 = t2.expressions.get_item (1) as MathConstant;
         assert (c3 != null);
-        var m2 = t2.expressions.get_item (2) as Multiply;
+        var m2 = t2.expressions.get_item (2) as MathMultiply;
         assert (m2 != null);
         var c4 = t2.expressions.get_item (3) as Variable;
         assert (c4 != null);
@@ -636,7 +636,7 @@ class Tests {
         assert (t1.expressions.get_n_items () == 3);
         var c1 = t1.expressions.get_item (0) as MathConstant;
         assert (c1 != null);
-        var m1 = t1.expressions.get_item (1) as Multiply;
+        var m1 = t1.expressions.get_item (1) as MathMultiply;
         assert (m1 != null);
         var g = t1.expressions.get_item (2) as MathGroup;
         assert (g != null);
@@ -698,7 +698,7 @@ class Tests {
         assert (plus != null);
         var c3 = tg2.expressions.get_item (1) as MathConstant;
         assert (c3 != null);
-        var m1 = t1.expressions.get_item (1) as Multiply;
+        var m1 = t1.expressions.get_item (1) as MathMultiply;
         assert (m1 != null);
         var c1 = t1.expressions.get_item (2) as MathConstant;
         assert (c1 != null);
@@ -862,11 +862,11 @@ class Tests {
         assert (t1.expressions.get_n_items () == 5);
         var c1 = t1.expressions.get_item (0) as MathConstant;
         assert (c1 != null);
-        var m1 = t1.expressions.get_item (1) as Multiply;
+        var m1 = t1.expressions.get_item (1) as MathMultiply;
         assert (m1 != null);
         var c2 = t1.expressions.get_item (2) as MathConstant;
         assert (c2 != null);
-        var m2 = t1.expressions.get_item (3) as Multiply;
+        var m2 = t1.expressions.get_item (3) as MathMultiply;
         assert (m2 != null);
         var f1 = t1.expressions.get_item (4) as MathFunction;
         assert (f1 != null);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]