##// END OF EJS Templates
Updated to fixed TS lib, added spectrogram min/max sampling hints when available...
Updated to fixed TS lib, added spectrogram min/max sampling hints when available Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r0:86b06c4cec3c
r85:1e3f92d40b0e
Show More
TestContainers.cpp
36 lines | 860 B | text/x-c | CppLexer
#include <Common/containers.h>
#include <vector>
#include <set>
#include <list>
#include <QVector>
#include <QList>
#include <QObject>
#include <QtTest>
template<class T>
void test()
{
T cont{{1,2,3,3,3}};
T empty;
QCOMPARE(SciQLop::containers::contains(cont,1),true);
QCOMPARE(SciQLop::containers::contains(cont,3),true);
QCOMPARE(SciQLop::containers::contains(cont,-1),false);
QCOMPARE(SciQLop::containers::contains(empty,1),false);
}
class TestContainers: public QObject {
Q_OBJECT
private slots:
void testVector() { test< std::vector<int> >();}
void testSet() { test< std::set<int> >();}
void testList() { test< std::list<int> >();}
void testQVector(){ test< QVector<int> >();}
void testQList() { test< QList<int> >();}
};
QTEST_MAIN(TestContainers)
#include "TestContainers.moc"