-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest.cpp
46 lines (36 loc) · 941 Bytes
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "database/dbtest.h"
#include "database/database.h"
#include "QRHandler.h"
#include "QRScanner.h"
int main(int argc, char** argv) {
testScanner();
Database::openDatabase();
dbtest::testCreating();
dbtest::testLoading();
return 0;
// testing file for QRHandler & QRScanner
/*
#include <iostream>
#include "QRHandler.h"
#include "QRScanner.h"
void testHandler() {
QRHandler myHandle;
std::cout << myHandle.generateToFile("Hello World!", "./img/HelloWorld.png");
}
void testScanner() {
QRScanner myScanner;
std::cout << myScanner.decodeFromFile("./img/HelloWorld.png").toUtf8().data();
}
int main(int argc, char** argv) {
testScanner();
return 0;
*/
}
void testHandler() {
QRHandler myHandle;
std::cout << myHandle.generateToFile("Hello World!", "./img/HelloWorld.png");
}
void testScanner() {
QRScanner myScanner;
std::cout << myScanner.decodeFromFile("./img/HelloWorld.png").toUtf8().data();
}