<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ai dreptate. E nevoie de un pic de ajutor aici. Dar e simplu.<br>
<br>
OK, sa zicem ca am dat<br>
<blockquote type="cite">make run-attr-miss3<br>
</blockquote>
si primesc un fail "Wrong error:" . De unde stiu care este "the
Right error"?<br>
<br>
Well testul e implementat in C++ , si se gaseste in
tests/error/attr-miss3TestRig.cpp . Codul arata asa:<br>
<br>
<blockquote type="cite"><tt> bool test(lcpl::Program *p) noexcept
override {</tt><tt><br>
</tt><tt>
try {</tt><tt><br>
</tt><tt>
createAndRunSema(p);</tt><tt><br>
</tt><tt>
} catch (lcpl::UnknownVariableException &) {</tt><tt><br>
</tt><tt>
return pass();</tt><tt><br>
</tt><tt>
} catch (lcpl::SemanticException &e) {</tt><tt><br>
</tt><tt>
return fail(std::string("Wrong error: ") + e.what());</tt><tt><br>
</tt><tt>
}</tt><tt><br>
</tt>
<tt><br>
</tt><tt>
return fail("Should error");</tt><tt><br>
</tt><tt>
}</tt></blockquote>
<br>
Si devine destul de clar. Output-ul corect este dat de un "throw
UnknownVariableException".<br>
<br>
Adaug si in wiki.<br>
<br>
--Bogdan<br>
<br>
<div class="moz-cite-prefix">On 11/25/2015 8:28 PM, Dragos Rugescu
via cpl wrote:<br>
</div>
<blockquote
cite="mid:1211872232.8701163.1448476093806.JavaMail.yahoo@mail.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:verdana, helvetica, sans-serif;font-size:10px">
<div id="yui_3_16_0_1_1448101622248_100441"><span>Buna seara,</span></div>
<div id="yui_3_16_0_1_1448101622248_100443"><span><br>
</span></div>
<div id="yui_3_16_0_1_1448101622248_100373">Am o problema de
depanare.</div>
<div id="yui_3_16_0_1_1448101622248_100370"><span><br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100339"><span
id="yui_3_16_0_1_1448101622248_100343">Spre exemplu, in
cazul testului attr-miss3, tester-ul raporteaza ca am output
prost.</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100339"><span
id="yui_3_16_0_1_1448101622248_100587">(FAIL: Wrong error:
Error in line 14 : Incompatible types intModel and int)</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100339"><span><br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100339"><span
id="yui_3_16_0_1_1448101622248_100503">Nu spune insa de ce,
si care ar fi cel corect. Toate testele precedente imi trec,
(inclusiv attr-miss si attr-miss2). Holbandu-ma la fisierul
sursa, nu vad ce nu e in regula la output-ul meu.</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100337"><span><br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100335">In fazele
initiale de rezolvare a temei ramanem doar la ghicit (poate o
fi atributul, poate nu).</div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100335"><br>
</div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100335">Avand in
vedere ca este foarte dificil de urmarit ce se doreste a fi
output-ul corect in unele circumstante, cum putem vedea in caz
de eroare, ce trebuia sa afisam? Analizand structura arhivei,
output-ul interpretorului imi pare obfuscat special (what's
the point?).<span><br>
</span></div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100335"><br>
</div>
<div dir="ltr" id="yui_3_16_0_1_1448101622248_100335">Multumesc
anticipat,</div>
<div id="yui_3_16_0_1_1448101622248_100341"> </div>
<div class="signature" id="yui_3_16_0_1_1448101622248_100323">
<div id="yui_3_16_0_1_1448101622248_100333">Dragos-Ronald
Rugescu<span style="font-weight:bold;"></span></div>
<div style="font-family:arial, helvetica, clean, sans-serif;"
id="yui_3_16_0_1_1448101622248_100331"><span
style="font-weight:bold;"><br>
</span></div>
<div style="font-family:arial, helvetica, clean, sans-serif;"
id="yui_3_16_0_1_1448101622248_100329"><span
style="font-weight:bold;">Assistant CEO</span><br>
<span style="font-weight:bold;">ADDA Ltd</span></div>
<div style="font-family:arial, helvetica, clean, sans-serif;"
id="yui_3_16_0_1_1448101622248_100327"><span
style="font-style:italic;"
id="yui_3_16_0_1_1448101622248_100501">Excellence.
Professionalism. Vision.</span><br>
18 Pictor Octav Bancila St., Sector 6, Bucharest, 060144<br>
<span style="font-weight:bold;"
id="yui_3_16_0_1_1448101622248_100499"><span
style="color:rgb(0, 0, 127);">Ro</span><span
style="color:rgb(255, 127, 0);">ma</span><span
style="color:rgb(255, 0, 0);">nia</span>, <span
style="color:rgb(0, 0, 191);">E</span><span
style="color:rgb(191, 191, 0);">U</span></span><br>
<a moz-do-not-send="true" rel="nofollow" target="_blank"
href="http://www.addastronautica.r0/">www.addastronautica.ro</a></div>
<div style="font-family:arial, helvetica, clean, sans-serif;"
id="yui_3_16_0_1_1448101622248_100325"><a
moz-do-not-send="true" rel="nofollow" target="_blank"
href="mailto:dragos.rugescu@yahoo.com"
id="yui_3_16_0_1_1448101622248_100783"><a class="moz-txt-link-abbreviated" href="mailto:dragos.rugescu@yahoo.com">dragos.rugescu@yahoo.com</a></a><br>
</div>
<div id="yui_3_16_0_1_1448101622248_100322"><a
moz-do-not-send="true" rel="nofollow" target="_blank"
href="mailto:dragos.rugescu@addastronautica.ro"
id="yui_3_16_0_1_1448101622248_100497"><a class="moz-txt-link-abbreviated" href="mailto:dragos.rugescu@addastronautica.ro">dragos.rugescu@addastronautica.ro</a></a><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cpl mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cpl@cursuri.cs.pub.ro">cpl@cursuri.cs.pub.ro</a>
<a class="moz-txt-link-freetext" href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/cpl">http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/cpl</a>
</pre>
</blockquote>
<br>
</body>
</html>