diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-15 12:16:00 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-15 12:16:00 +0300 |
commit | c94ee67077076fdfb3ad04e93a0de2ae32b6a4e5 (patch) | |
tree | 437dec3be224cae5e229eeaa4ac9ebeedffd03e3 /tests/GZip_test.cpp | |
parent | 019e5ca3e819f5daf9933bc0fb091784b0ca561f (diff) | |
parent | 8f5bb982cd27dd9158b63d826769c168455a139b (diff) | |
download | PrismLauncher-c94ee67077076fdfb3ad04e93a0de2ae32b6a4e5.tar.gz PrismLauncher-c94ee67077076fdfb3ad04e93a0de2ae32b6a4e5.tar.bz2 PrismLauncher-c94ee67077076fdfb3ad04e93a0de2ae32b6a4e5.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curseforge-url-handle3
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'tests/GZip_test.cpp')
-rw-r--r-- | tests/GZip_test.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/GZip_test.cpp b/tests/GZip_test.cpp index 82503d81..c11ba271 100644 --- a/tests/GZip_test.cpp +++ b/tests/GZip_test.cpp @@ -3,18 +3,16 @@ #include <GZip.h> #include <random> -void fib(int &prev, int &cur) +void fib(int& prev, int& cur) { auto ret = prev + cur; prev = cur; cur = ret; } -class GZipTest : public QObject -{ +class GZipTest : public QObject { Q_OBJECT -private -slots: + private slots: void test_Through() { @@ -27,9 +25,8 @@ slots: std::uniform_int_distribution<uint16_t> idis(0, std::numeric_limits<uint8_t>::max()); // initialize random buffer - for(int i = 0; i < size; i++) - { - random.append((char)idis(eng)); + for (int i = 0; i < size; i++) { + random.append(static_cast<char>(idis(eng))); } // initialize fibonacci @@ -37,8 +34,7 @@ slots: int cur = 1; // test if fibonacci long random buffers pass through GZip - do - { + do { QByteArray copy = random; copy.resize(cur); compressed.clear(); |