00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <iostream>
00012 #include <string>
00013
00014 #include <QtGui/QApplication>
00015 #include "SeExprEdDialog.h"
00016
00017 int main(int argc, char *argv[])
00018 {
00019 QApplication app(argc, argv);
00020 SeExprEdDialog dialog(0);
00021 dialog.setWindowTitle("Expression Editor");
00022 dialog.show();
00023
00024 if (argc < 2 || std::string(argv[1]) != "-automatedTest") {
00025 if (dialog.exec() == QDialog::Accepted)
00026 std::cerr << "returned expression: " << dialog.getExpressionString() << std::endl;
00027 } else {
00028 std::string str = "$u + $v";
00029 dialog.setExpressionString(str);
00030 if (dialog.getExpressionString() != str ) {
00031 std::cerr << "test failed: " << dialog.getExpressionString() << " != " << str << std::endl;
00032 return 1;
00033 }
00034 }
00035
00036 return 0;
00037 }
00038