[gnome-calculator/wip/currency-conversion-plugins] Added basic currency test



commit efd6631dbd4aff753913ed0a8d30b5db1a576f22
Author: Robert Roth <robert roth off gmail com>
Date:   Fri Jan 15 08:40:33 2021 +0200

    Added basic currency test

 tests/test-equation.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/tests/test-equation.vala b/tests/test-equation.vala
index d2e6806a..df4df2d9 100644
--- a/tests/test-equation.vala
+++ b/tests/test-equation.vala
@@ -723,6 +723,14 @@ private void test_base_conversion ()
     test ("0xa in dec", "10", 0);
 }
 
+private void test_currency_conversions ()
+{
+    CurrencyManager.get_default (false).refresh_interval = 3600;
+    CurrencyManager.get_default ().refresh_sync ();
+    
+    test ("1 EUR in EUR", "1", 0);
+}
+
 private void test_precedence ()
 {
     number_base = 10;
@@ -819,6 +827,7 @@ public int main (string[] args)
     test_conversions ();
     test_equations ();
     test_base_conversion ();
+    test_currency_conversions ();
     test_precedence ();
     test_custom_functions ();
     test_bit_shift ();


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