Add some unit tests to Tools

Clean up and test 3 methods from Tools:
- humanReadableFileSize
- isHex
- isBase64
This commit is contained in:
Michal Kaptur 2018-05-14 21:26:26 +02:00
parent 8a0aae775a
commit 486b99b39d
7 changed files with 120 additions and 19 deletions

View file

@ -32,7 +32,7 @@ class QIODevice;
namespace Tools
{
QString humanReadableFileSize(qint64 bytes);
QString humanReadableFileSize(qint64 bytes, quint32 precision = 2);
bool hasChild(const QObject* parent, const QObject* child);
bool readFromDevice(QIODevice* device, QByteArray& data, int size = 16384);
bool readAllFromDevice(QIODevice* device, QByteArray& data);