codex
Loading...
Searching...
No Matches
test.hpp
Go to the documentation of this file.
1#ifndef CODEX_BASE64_TEST_H
2#define CODEX_BASE64_TEST_H
3
4#include <random>
5#include <vector>
6
7#include <QTest>
8
9class Base64Test : public QObject {
10 Q_OBJECT
11 static constexpr std::size_t N_SAMPLES = 8, MAX_SIZE = 1 << 13;
12 std::mt19937 gen;
13 std::vector<std::size_t> sizes;
14public:
15 Base64Test();
16private slots:
17 void rfc_4648_data();
18 void rfc_4648();
19 void base64_encode_data();
20 void base64_encode();
21 void base64_decode_data();
22 void base64_decode();
24 void rfc_4648_encode();
26 void rfc_4648_decode();
27 void invalid();
28 void pad_data();
29 void pad();
30};
31
32#endif
Definition test.hpp:9
void rfc_4648_encode()
Definition test.cpp:75
static constexpr std::size_t MAX_SIZE
Definition test.hpp:11
void invalid()
Definition test.cpp:80
void rfc_4648_encode_data()
Definition test.cpp:68
void rfc_4648_decode()
Definition test.cpp:77
static constexpr std::size_t N_SAMPLES
Definition test.hpp:11
void base64_decode()
Definition test.cpp:73
void base64_decode_data()
Definition test.cpp:67
void base64_encode_data()
Definition test.cpp:66
Base64Test()
Definition test.cpp:27
void pad_data()
Definition test.cpp:87
void rfc_4648()
Definition test.cpp:50
std::vector< std::size_t > sizes
Definition test.hpp:13
void rfc_4648_data()
Definition test.cpp:38
void base64_encode()
Definition test.cpp:71
void pad()
Definition test.cpp:94
void rfc_4648_decode_data()
Definition test.cpp:69
std::mt19937 gen
Definition test.hpp:12