Add basic tests facility

This commit is contained in:
Debao Zhang
2013-08-30 13:17:09 +08:00
parent 7816c724dc
commit 9154e483b9
8 changed files with 147 additions and 6 deletions
+3
View File
@@ -7,6 +7,9 @@ load(qt_module)
CONFIG += build_xlsx_lib
include(qtxlsx.pri)
#Define this macro if you want to run tests, so more AIPs will get exported.
#DEFINES += XLSX_TEST
QMAKE_TARGET_COMPANY = "Debao Zhang"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2013 Debao Zhang <hello@debao.me>"
QMAKE_TARGET_DESCRIPTION = ".Xlsx file wirter for Qt5"
+2 -1
View File
@@ -25,6 +25,7 @@
#ifndef XLSXDOCPROPS_H
#define XLSXDOCPROPS_H
#include "xlsxglobal.h"
#include <QObject>
#include <QList>
#include <QPair>
@@ -34,7 +35,7 @@ class QIODevice;
namespace QXlsx {
class DocProps : public QObject
class XLSX_AUTOTEST_EXPORT DocProps : public QObject
{
Q_OBJECT
public:
+6
View File
@@ -38,6 +38,12 @@ namespace QXlsx {
# define Q_XLSX_EXPORT
#endif
#ifdef XLSX_TEST
# define XLSX_AUTOTEST_EXPORT Q_XLSX_EXPORT
#else
# define XLSX_AUTOTEST_EXPORT
#endif
}
#endif // XLSXGLOBAL_H
+6 -5
View File
@@ -25,15 +25,16 @@
#ifndef XLSXUTILITY_H
#define XLSXUTILITY_H
#include "xlsxglobal.h"
class QPoint;
class QString;
namespace QXlsx {
int intPow(int x, int p);
QPoint xl_cell_to_rowcol(const QString &cell_str);
QString xl_col_to_name(int col_num);
QString xl_rowcol_to_cell(int row, int col, bool row_abs=false, bool col_abs=false);
QString xl_rowcol_to_cell_fast(int row, int col);
XLSX_AUTOTEST_EXPORT int intPow(int x, int p);
XLSX_AUTOTEST_EXPORT QPoint xl_cell_to_rowcol(const QString &cell_str);
XLSX_AUTOTEST_EXPORT QString xl_col_to_name(int col_num);
XLSX_AUTOTEST_EXPORT QString xl_rowcol_to_cell(int row, int col, bool row_abs=false, bool col_abs=false);
XLSX_AUTOTEST_EXPORT QString xl_rowcol_to_cell_fast(int row, int col);
} //QXlsx
#endif // XLSXUTILITY_H