SeExpr
ExprMain.cpp
Go to the documentation of this file.
1/*
2* Copyright Disney Enterprises, Inc. All rights reserved.
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License
6* and the following modification to it: Section 6 Trademarks.
7* deleted and replaced with:
8*
9* 6. Trademarks. This License does not grant permission to use the
10* trade names, trademarks, service marks, or product names of the
11* Licensor and its affiliates, except as required for reproducing
12* the content of the NOTICE file.
13*
14* You may obtain a copy of the License at
15* http://www.apache.org/licenses/LICENSE-2.0
16*/
17
18#include <iostream>
19#include <string>
20
21#include <QApplication>
22#include "ExprDialog.h"
23
24int main(int argc, char *argv[]) {
25 QApplication app(argc, argv);
26 ExprDialog dialog(0);
27 dialog.setWindowTitle("Expression Editor 2");
28 dialog.show();
29
30 if (argc < 2 || std::string(argv[1]) != "-automatedTest") {
31 if (dialog.exec() == QDialog::Accepted)
32 std::cerr << "returned expression: " << dialog.getExpressionString() << std::endl;
33 } else {
34 std::string str = "$u + $v";
35 dialog.setExpressionString(str);
36 if (dialog.getExpressionString() != str) {
37 std::cerr << "test failed: " << dialog.getExpressionString() << " != " << str << std::endl;
38 return 1;
39 }
40 }
41
42 return 0;
43}
int main(int argc, char *argv[])
Definition ExprMain.cpp:24
std::string getExpressionString()
Definition ExprDialog.h:70
void setExpressionString(const std::string &str)
Definition ExprDialog.h:72