mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-08-31 04:39:56 +00:00
Replace yahoo finance to stooq (#131)
Old code is dropped to separated provider
This commit is contained in:
@ -64,8 +64,8 @@ void TestExtQuotes::test_run()
|
||||
|
||||
for (auto &type : types) {
|
||||
QCOMPARE(firstValue[extQuotes->tag(type)].toDouble(), 0.0);
|
||||
QVERIFY((cache[type].toDouble() > price.first)
|
||||
&& (cache[type].toDouble() < price.second));
|
||||
QVERIFY((cache[type].toDouble() >= price.first)
|
||||
&& (cache[type].toDouble() <= price.second));
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,9 +84,7 @@ void TestExtQuotes::test_derivatives()
|
||||
values[type] = arguments.at(0).toHash()[extQuotes->tag(type)];
|
||||
|
||||
for (auto &type : types) {
|
||||
QCOMPARE(arguments.at(0)
|
||||
.toHash()[extQuotes->tag(QString("%1chg").arg(type))]
|
||||
.toDouble(),
|
||||
QCOMPARE(arguments.at(0).toHash()[extQuotes->tag(QString("%1chg").arg(type))].toDouble(),
|
||||
(values[type].toDouble() - cache[type].toDouble()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user