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
Utilities
Konsole
Commits
bb8e2bf2
Commit
bb8e2bf2
authored
Jun 05, 2012
by
Jekyll Wu
Browse files
Fix the wrong usage of the QCOMPARE macro
parent
9600abfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tests/PtyTest.cpp
View file @
bb8e2bf2
...
...
@@ -43,7 +43,7 @@ void PtyTest::testFlowControl()
const
bool
input
=
true
;
pty
.
setFlowControlEnabled
(
input
);
const
bool
output
=
pty
.
flowControlEnabled
();
QCOMPARE
(
in
put
,
out
put
);
QCOMPARE
(
out
put
,
in
put
);
}
void
PtyTest
::
testEraseChar
()
...
...
@@ -52,7 +52,7 @@ void PtyTest::testEraseChar()
const
char
input
=
'x'
;
pty
.
setEraseChar
(
input
);
const
char
output
=
pty
.
eraseChar
();
QCOMPARE
(
in
put
,
out
put
);
QCOMPARE
(
out
put
,
in
put
);
}
void
PtyTest
::
testUseUtmp
()
...
...
@@ -61,7 +61,7 @@ void PtyTest::testUseUtmp()
const
bool
input
=
true
;
pty
.
setUseUtmp
(
input
);
const
bool
output
=
pty
.
isUseUtmp
();
QCOMPARE
(
in
put
,
out
put
);
QCOMPARE
(
out
put
,
in
put
);
}
void
PtyTest
::
testWindowSize
()
...
...
@@ -70,7 +70,7 @@ void PtyTest::testWindowSize()
QSize
input
(
80
,
40
);
pty
.
setWindowSize
(
input
.
width
(),
input
.
height
());
QSize
output
=
pty
.
windowSize
();
QCOMPARE
(
in
put
,
out
put
);
QCOMPARE
(
out
put
,
in
put
);
}
void
PtyTest
::
testRunProgram
()
...
...
@@ -82,12 +82,11 @@ void PtyTest::testRunProgram()
QStringList
environments
;
const
int
result
=
pty
.
start
(
program
,
arguments
,
environments
);
QCOMPARE
(
result
,
0
);
QCOMPARE
(
result
,
0
);
// since there is no other processes using this pty, the two methods
// should return the same pid.
QCOMPARE
(
pty
.
pid
(),
pty
.
foregroundProcessGroup
());
QCOMPARE
(
pty
.
foregroundProcessGroup
(),
pty
.
pid
());
}
QTEST_KDEMAIN_CORE
(
PtyTest
)
...
...
Write
Preview
Supports
Markdown
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