[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 117575: vimode: stage 2 of the split of the tests.
From: Miquel_Sabaté_Solà <mikisabate () gmail ! com>
Date: 2014-04-16 8:34:00
Message-ID: 20140416083400.4597.10328 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117575/
-----------------------------------------------------------
(Updated April 16, 2014, 8:33 a.m.)
Status
------
This change has been marked as submitted.
Review request for Kate, Michal Humpula and Simon St James.
Repository: ktexteditor
Description
-------
The main.cpp file of the vimode tests is *huge* and complex. Michal started to split \
the tests with the review #117032 . Now it's time for the "stage 2": split the \
main.{h,cpp} files into separate files. My logic on splitting has been:
- modes: contains the tests for normal, insert, replace, visual and command modes.
- completion: contains the tests for code completion.
- keys: contains things like: mappings, keyparsing, macros, marks, etc.
- view: contains some random tests that affect the kate view.
I'm not the best guy at naming things, so I'm open for naming suggestions :) \
Moreover, I've splitted this into just 4 files because I think that it doesn't make \
sense to split it any further (e.g. split each mode into separate test classes). \
Apart from the tests, I've also added the base.{h,cpp} files, that implement the \
BaseTest class and other helpers. The BaseTest class contains all the code that all \
the test classes might want to use. Therefore, all the test classes are expected to \
subclass the BaseTest class.
Note also that each test class is, indeed, a QTest on its own. This means that we \
cannot link an executable that includes all the tests. My solution to this new \
problem has been to just create the all.sh script that does a simple for loop calling \
each test. The script starts by setting "set -e". Therefore, if it finds any error it \
will stop immediately, and if everything goes well it will execute all the classes \
properly.
Now, this is stage 2. If we agree on this and this commit finally gets pushed, I'll \
move to the final stage: splitting the test functions into tinier and more specific \
functions. In this stage I'll also try to add more test functions (e.g. in replace \
mode we have a TODO saying that we need more tests on this mode).
Diffs
-----
autotests/src/vimode/CMakeLists.txt 555a821
autotests/src/vimode/base.h PRE-CREATION
autotests/src/vimode/base.cpp PRE-CREATION
autotests/src/vimode/completion.h PRE-CREATION
autotests/src/vimode/completion.cpp PRE-CREATION
autotests/src/vimode/fakecodecompletiontestmodel.h PRE-CREATION
autotests/src/vimode/fakecodecompletiontestmodel.cpp PRE-CREATION
autotests/src/vimode/keys.h PRE-CREATION
autotests/src/vimode/keys.cpp PRE-CREATION
autotests/src/vimode/main.h e25ec1f
autotests/src/vimode/main.cpp ee2222f
autotests/src/vimode/modes.h PRE-CREATION
autotests/src/vimode/modes.cpp PRE-CREATION
autotests/src/vimode/view.h PRE-CREATION
autotests/src/vimode/view.cpp PRE-CREATION
Diff: https://git.reviewboard.kde.org/r/117575/diff/
Testing
-------
All the tests are passing.
Thanks,
Miquel Sabaté SolÃ
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/117575/">https://git.reviewboard.kde.org/r/117575/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;"> <tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1> </td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Kate, Michal Humpula and Simon St James.</div>
<div>By Miquel Sabaté Solà .</div>
<p style="color: grey;"><i>Updated April 16, 2014, 8:33 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ktexteditor
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The main.cpp file of the vimode tests is *huge* and complex. Michal \
started to split the tests with the review #117032 . Now it's time for the \
"stage 2": split the main.{h,cpp} files into separate files. My logic on \
splitting has been:
- modes: contains the tests for normal, insert, replace, visual and command modes.
- completion: contains the tests for code completion.
- keys: contains things like: mappings, keyparsing, macros, marks, etc.
- view: contains some random tests that affect the kate view.
I'm not the best guy at naming things, so I'm open for naming suggestions :) \
Moreover, I've splitted this into just 4 files because I think that it \
doesn't make sense to split it any further (e.g. split each mode into separate \
test classes). Apart from the tests, I've also added the base.{h,cpp} files, that \
implement the BaseTest class and other helpers. The BaseTest class contains all the \
code that all the test classes might want to use. Therefore, all the test classes are \
expected to subclass the BaseTest class.
Note also that each test class is, indeed, a QTest on its own. This means that we \
cannot link an executable that includes all the tests. My solution to this new \
problem has been to just create the all.sh script that does a simple for loop calling \
each test. The script starts by setting "set -e". Therefore, if it finds \
any error it will stop immediately, and if everything goes well it will execute all \
the classes properly.
Now, this is stage 2. If we agree on this and this commit finally gets pushed, \
I'll move to the final stage: splitting the test functions into tinier and more \
specific functions. In this stage I'll also try to add more test functions (e.g. \
in replace mode we have a TODO saying that we need more tests on this mode). </pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">All the tests are passing.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/src/vimode/CMakeLists.txt <span style="color: \
grey">(555a821)</span></li>
<li>autotests/src/vimode/base.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/base.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/completion.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/completion.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/fakecodecompletiontestmodel.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/fakecodecompletiontestmodel.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/keys.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/keys.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/main.h <span style="color: grey">(e25ec1f)</span></li>
<li>autotests/src/vimode/main.cpp <span style="color: grey">(ee2222f)</span></li>
<li>autotests/src/vimode/modes.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/modes.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/view.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>autotests/src/vimode/view.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117575/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic