Changeset View
Changeset View
Standalone View
Standalone View
src/backends/octave/testoctave.cpp
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | 194 | { | |||
---|---|---|---|---|---|
199 | 199 | | |||
200 | Cantor::Expression* e = evalExp(QLatin1String( | 200 | Cantor::Expression* e = evalExp(QLatin1String( | ||
201 | "x = -10:0.1:10;\n" | 201 | "x = -10:0.1:10;\n" | ||
202 | "plot (x, sin (x));\n" | 202 | "plot (x, sin (x));\n" | ||
203 | "xlabel (\"x\");\n" | 203 | "xlabel (\"x\");\n" | ||
204 | "ylabel (\"sin (x)\");\n" | 204 | "ylabel (\"sin (x)\");\n" | ||
205 | "title (\"Simple 2-D Plot\");\n" | 205 | "title (\"Simple 2-D Plot\");\n" | ||
206 | )); | 206 | )); | ||
207 | | ||||
207 | QVERIFY(e!=nullptr); | 208 | QVERIFY(e!=nullptr); | ||
208 | QCOMPARE(e->status(), Cantor::Expression::Done); | 209 | QCOMPARE(e->status(), Cantor::Expression::Done); | ||
209 | QVERIFY(e->result()); | 210 | QVERIFY(e->result()!=nullptr); | ||
210 | QVERIFY(e->result()->type() != Cantor::TextResult::Type); | 211 | QVERIFY(e->result()->type() == Cantor::TextResult::Type); | ||
211 | 212 | | |||
212 | if(session()->status()==Cantor::Session::Running) | 213 | if(session()->status()==Cantor::Session::Running) | ||
213 | waitForSignal(session(), SIGNAL(statusChanged(Cantor::Session::Status))); | 214 | waitForSignal(session(), SIGNAL(statusChanged(Cantor::Session::Status))); | ||
214 | 215 | | |||
215 | QCOMPARE(1, model->rowCount()); | 216 | QCOMPARE(1, model->rowCount()); | ||
216 | 217 | | |||
217 | QCOMPARE(model->index(0,0).data().toString(), QLatin1String("x")); | 218 | QCOMPARE(model->index(0,0).data().toString(), QLatin1String("x")); | ||
218 | } | 219 | } | ||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |