Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Cantor
Commits
3b28a179
Commit
3b28a179
authored
Jun 26, 2021
by
Alexander Semke
Browse files
Fixed some failing Octave tests.
parent
7ef805f7
Pipeline
#67569
passed with stage
in 25 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/backends/octave/testoctave.cpp
View file @
3b28a179
...
...
@@ -73,7 +73,7 @@ void TestOctave::testVariableDefinition()
QVERIFY
(
e
!=
nullptr
);
QVERIFY
(
e
->
result
()
!=
nullptr
);
QCOMPARE
(
cleanOutput
(
e
->
result
()
->
data
().
toString
()),
QLatin1String
(
"testvar =
1"
));
QCOMPARE
(
cleanOutput
(
e
->
result
()
->
data
().
toString
()),
QLatin1String
(
"testvar = 1"
));
}
void
TestOctave
::
testMatrixDefinition
()
...
...
@@ -200,7 +200,7 @@ void TestOctave::testVariablesCreatingFromCode()
QCOMPARE
(
2
,
model
->
rowCount
());
QCOMPARE
(
model
->
index
(
0
,
0
).
data
().
toString
(),
QLatin1String
(
"a"
));
QCOMPARE
(
model
->
index
(
0
,
1
).
data
().
toString
(),
QLatin1String
(
"
15"
));
QCOMPARE
(
model
->
index
(
0
,
1
).
data
().
toString
(),
QLatin1String
(
"15"
));
QCOMPARE
(
model
->
index
(
1
,
0
).
data
().
toString
(),
QLatin1String
(
"b"
));
QCOMPARE
(
model
->
index
(
1
,
1
).
data
().
toString
(),
QLatin1String
(
"S"
));
...
...
@@ -221,16 +221,18 @@ void TestOctave::testVariableCreatingFromCodeWithPlot()
"title (
\"
Simple 2-D Plot
\"
);
\n
"
));
QVERIFY
(
e
!=
nullptr
);
QCOMPARE
(
e
->
status
(),
Cantor
::
Expression
::
Done
);
QVERIFY
(
e
->
result
());
int
plotType
=
(
OctaveExpression
::
plotExtensions
[
OctaveSettings
::
inlinePlotFormat
()]
==
QLatin1String
(
"eps"
)
?
(
int
)
Cantor
::
EpsResult
::
Type
:
(
int
)
Cantor
::
ImageResult
::
Type
);
QVERIFY
(
e
->
result
()
->
type
()
==
plotType
);
if
(
session
()
->
status
()
==
Cantor
::
Session
::
Running
)
waitForSignal
(
session
(),
SIGNAL
(
statusChanged
(
Cantor
::
Session
::
Status
)));
QCOMPARE
(
1
,
model
->
rowCount
());
QCOMPARE
(
e
->
status
(),
Cantor
::
Expression
::
Done
);
QVERIFY
(
e
->
result
()
!=
nullptr
);
bool
eps
=
(
OctaveExpression
::
plotExtensions
[
OctaveSettings
::
inlinePlotFormat
()]
==
QLatin1String
(
"eps"
));
int
plotType
=
eps
?
(
int
)
Cantor
::
EpsResult
::
Type
:
(
int
)
Cantor
::
ImageResult
::
Type
;
QVERIFY
(
e
->
result
()
->
type
()
==
plotType
);
QCOMPARE
(
1
,
model
->
rowCount
());
QCOMPARE
(
model
->
index
(
0
,
0
).
data
().
toString
(),
QLatin1String
(
"x"
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment