summaryrefslogtreecommitdiffstats
path: root/kmymoney2/converter/convertertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/converter/convertertest.cpp')
-rw-r--r--kmymoney2/converter/convertertest.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kmymoney2/converter/convertertest.cpp b/kmymoney2/converter/convertertest.cpp
index aef63d9..70124ad 100644
--- a/kmymoney2/converter/convertertest.cpp
+++ b/kmymoney2/converter/convertertest.cpp
@@ -19,10 +19,10 @@
#include <config.h>
#endif
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -64,7 +64,7 @@ void ConverterTest::setUp () {
file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$"));
file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$"));
- file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1));
+ file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1));
file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#"));
file->setBaseCurrency(file->currency("USD"));
@@ -77,12 +77,12 @@ void ConverterTest::setUp () {
acLiability = (MyMoneyFile::instance()->liability().id());
acExpense = (MyMoneyFile::instance()->expense().id());
acIncome = (MyMoneyFile::instance()->income().id());
- acChecking = makeAccount("Checking Account",MyMoneyAccount::Checkings,moConverterCheckingOpen,QDate(2004,5,15),acAsset);
- acCredit = makeAccount("Credit Card",MyMoneyAccount::CreditCard,moConverterCreditOpen,QDate(2004,7,15),acLiability);
- acSolo = makeAccount("Solo",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense);
- acParent = makeAccount("Parent",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense);
- acChild = makeAccount("Child",MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent);
- acForeign = makeAccount("Foreign",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense);
+ acChecking = makeAccount("Checking Account",MyMoneyAccount::Checkings,moConverterCheckingOpen,TQDate(2004,5,15),acAsset);
+ acCredit = makeAccount("Credit Card",MyMoneyAccount::CreditCard,moConverterCreditOpen,TQDate(2004,7,15),acLiability);
+ acSolo = makeAccount("Solo",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense);
+ acParent = makeAccount("Parent",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense);
+ acChild = makeAccount("Child",MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent);
+ acForeign = makeAccount("Foreign",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense);
MyMoneyInstitution i("Bank of the World","","","","","","");
file->addInstitution(i);
@@ -112,8 +112,8 @@ void ConverterTest::testWebQuotes()
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
// Quote date should be within the last week, or something bad is going on.
- CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate());
- CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate());
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
// Quote value should at least be positive
CPPUNIT_ASSERT(qr.m_price.isPositive());
@@ -123,8 +123,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("EUR > USD","Yahoo Currency");
@@ -132,8 +132,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("50492","Globe & Mail");
@@ -141,8 +141,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
q.launch("TDB647","MSN.CA");
@@ -150,8 +150,8 @@ void ConverterTest::testWebQuotes()
// kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl;
CPPUNIT_ASSERT(qr.m_errors.count() == 0);
- CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1));
- CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7));
+ CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1));
+ CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7));
CPPUNIT_ASSERT(qr.m_price.isPositive());
}
@@ -168,39 +168,39 @@ void ConverterTest::testDateFormat()
{
MyMoneyDateFormat format("%mm-%dd-%yyyy");
- CPPUNIT_ASSERT(format.convertString("1-5-2005") == QDate(2005,1,5));
- CPPUNIT_ASSERT(format.convertString("jan-15-2005") == QDate(2005,1,15));
- CPPUNIT_ASSERT(format.convertString("august-25-2005") == QDate(2005,8,25));
+ CPPUNIT_ASSERT(format.convertString("1-5-2005") == TQDate(2005,1,5));
+ CPPUNIT_ASSERT(format.convertString("jan-15-2005") == TQDate(2005,1,15));
+ CPPUNIT_ASSERT(format.convertString("august-25-2005") == TQDate(2005,8,25));
format = MyMoneyDateFormat("%mm/%dd/%yy");
- CPPUNIT_ASSERT(format.convertString("1/5/05") == QDate(2005,1,5));
- CPPUNIT_ASSERT(format.convertString("jan/15/05") == QDate(2005,1,15));
- CPPUNIT_ASSERT(format.convertString("august/25/05") == QDate(2005,8,25));
+ CPPUNIT_ASSERT(format.convertString("1/5/05") == TQDate(2005,1,5));
+ CPPUNIT_ASSERT(format.convertString("jan/15/05") == TQDate(2005,1,15));
+ CPPUNIT_ASSERT(format.convertString("august/25/05") == TQDate(2005,8,25));
format = MyMoneyDateFormat("%d\\.%m\\.%yy");
- CPPUNIT_ASSERT(format.convertString("1.5.05") == QDate(2005,5,1));
- CPPUNIT_ASSERT(format.convertString("15.jan.05") == QDate(2005,1,15));
- CPPUNIT_ASSERT(format.convertString("25.august.05") == QDate(2005,8,25));
+ CPPUNIT_ASSERT(format.convertString("1.5.05") == TQDate(2005,5,1));
+ CPPUNIT_ASSERT(format.convertString("15.jan.05") == TQDate(2005,1,15));
+ CPPUNIT_ASSERT(format.convertString("25.august.05") == TQDate(2005,8,25));
format = MyMoneyDateFormat("%yyyy\\\\%dddd\\\\%mmmmmmmmmmm");
- CPPUNIT_ASSERT(format.convertString("2005\\31\\12") == QDate(2005,12,31));
- CPPUNIT_ASSERT(format.convertString("2005\\15\\jan") == QDate(2005,1,15));
- CPPUNIT_ASSERT(format.convertString("2005\\25\\august") == QDate(2005,8,25));
+ CPPUNIT_ASSERT(format.convertString("2005\\31\\12") == TQDate(2005,12,31));
+ CPPUNIT_ASSERT(format.convertString("2005\\15\\jan") == TQDate(2005,1,15));
+ CPPUNIT_ASSERT(format.convertString("2005\\25\\august") == TQDate(2005,8,25));
format = MyMoneyDateFormat("%m %dd, %yyyy");
- CPPUNIT_ASSERT(format.convertString("jan 15, 2005") == QDate(2005,1,15));
- CPPUNIT_ASSERT(format.convertString("august 25, 2005") == QDate(2005,8,25));
- CPPUNIT_ASSERT(format.convertString("january 1st, 2005") == QDate(2005,1,1));
+ CPPUNIT_ASSERT(format.convertString("jan 15, 2005") == TQDate(2005,1,15));
+ CPPUNIT_ASSERT(format.convertString("august 25, 2005") == TQDate(2005,8,25));
+ CPPUNIT_ASSERT(format.convertString("january 1st, 2005") == TQDate(2005,1,1));
format = MyMoneyDateFormat("%m %d %y");
- CPPUNIT_ASSERT(format.convertString("12/31/50",false,2000) == QDate(1950,12,31));
- CPPUNIT_ASSERT(format.convertString("1/1/90",false,2000) == QDate(1990,1,1));
- CPPUNIT_ASSERT(format.convertString("december 31st, 5",false) == QDate(2005,12,31));
+ CPPUNIT_ASSERT(format.convertString("12/31/50",false,2000) == TQDate(1950,12,31));
+ CPPUNIT_ASSERT(format.convertString("1/1/90",false,2000) == TQDate(1990,1,1));
+ CPPUNIT_ASSERT(format.convertString("december 31st, 5",false) == TQDate(2005,12,31));
}
catch (MyMoneyException* e)
{