<div dir="ltr"><img width="0" height="0" class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/0294c03473aad3b34377b56593d8a8bebef0a3f0.png?u=1477559"><div></div>I'm adding my test to autotests/parttest.cpp with a test function PartTest::testTypewriterAnnotTool. <div>For the annotation toolbar, I have #include "../ui/pageviewannotator.h" and doing this in the test function:</div><div><br></div><div><div>PageViewAnnotator pageviewannotator(part.m_pageView, part.m_document);</div><div>pageviewannotator.setEnabled( true );</div></div><div><br></div><div>But on make, I'm getting linking error as the undefined reference to PageViewAnnotator::PageViewAnnotator(PageView*, Okular::Document*)</div><div><br></div><div>How to resolve this and check for the typewriter tool button in the toolbar?</div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 6, 2018 at 3:08 PM, Dileep Sankhla <span dir="ltr"><<a href="mailto:sankhla.dileep96@gmail.com" target="_blank">sankhla.dileep96@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><img width="0" height="0" class="m_5117299919322618554mailtrack-img" alt="" style="display:flex" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"><div></div>Hello Tobias,<div><br></div><div>Thank you so much for the detailed explanation. I got the overview of how tests are written and how they are currently organized. </div><div><br></div><div>I have just begun to write the test for typewriter annotation tool and my first test case is "checking if the annotation toolbar has the typewriter tool button in it?"</div><div><br></div><div>Till now I have been succeeded in opening the document data/file1.pdf with the current page as 0 by using the object of Okular::Part and now I'm not getting the way of showing the annotation toolbar and how will I check for the typewriter tool in it? </div><div><br></div><div>Do I need to simulate <F6> keypress for showing the annotation toolbar and if yes, then how will I check for the specific tool in it? </div><div><br></div><div>Need help.</div><div><br></div><div>Thanks and Regards</div><span class="HOEnZb"><font color="#888888"><div>Dileep </div><div><br><br><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 4, 2018 at 1:19 AM, Tobias Deiminger <span dir="ltr"><<a href="mailto:haxtibal@posteo.de" target="_blank">haxtibal@posteo.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Am 03.06.2018 21:39 schrieb Tobias Deiminger:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 03.06.2018 08:05 schrieb Dileep Sankhla:<br>
</blockquote>
<br></span>
Ups, I misread the question<span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What will I compare here?<br>
</blockquote></blockquote>
<br></span>
as "what will compare here?"<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
GUI tests compare with autotests/parttest.cpp.<br>
Core tests potentially compare with autotests/*annot*.cpp<br>
Afaikt there are no tests yet that check painting results pixel wise.<br>
</blockquote>
<br></span>
New answer: You compare actual outcome with expected outcome. What actual outcome and expected outcome means depends on your test case. You have to define it.<span class="m_5117299919322618554HOEnZb"><font color="#888888"><br>
<br>
Tobias<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>