1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #include <QCoreApplication>
- #include <QStringList>
- #include <iostream>
-
- #include "test.h"
- #include "bctest.h"
-
- int main(int argc, char *argv[])
- {
- #ifdef PT_DEBUG
- std::cout<<"Debug mode"<<std::endl;
- #else
- std::cout<<"Release mode"<<std::endl;
- #warning PTSocket is not in debug mode
- #endif
-
- QCoreApplication a(argc, argv);
- bool pt = false, bc = false;
- if(qApp->arguments().size() >= 2)
- {
- if(qApp->arguments().at(1) == "-bc")
- bc = true;
- else if(qApp->arguments().at(1) == "-pt")
- pt = true;
- else
- {
- std::cout<<"Usage: tests -bc|-pt"<<std::endl;
- return 1;
- }
- }
- else
- {
- std::cout<<"Usage: tests -bc|-pt"<<std::endl;
- return 1;
- }
-
- BcTest bct;
- Test t;
- if(bc)
- {
- bct.test();
- }
- else if(pt)
- {
- t.testListen(6950);
- t.test0IntConvert();
- }
-
- return a.exec();
- }
|