<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 18, 2012, at 9:53 AM, Jonathan Duke Leto wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">is($x eq $y, 'blarg')<br><br>this is better:<br><br>cmp_ok($x, 'eq', $y, 'blarg')<br><br>because you will get better error reporting from cmp_ok. It knows that<br>you are using 'eq', so it can say "hey, $x != $y", whereas the first<br>test will just say "this thing isn't true", which isn't nearly as<br>useful.</span></span></blockquote></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Georgia; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>ok( $x eq $y, 'blarg' ) isn't informative.</div><div><br></div><div>is( $x, $y, 'blarg' ) tells you what's different.</div><div><br></div><div>cmp_ok( $x, 'eq', $y, 'blarg' ) is no more informative than the is() call.  cmp_ok should be used only if you want to compare using something other than 'eq'.</div><div><br></div><div>xoa</div><div><br></div><div><br>--<br>Andy Lester => <a href="mailto:andy@petdance.com">andy@petdance.com</a> => <a href="http://www.petdance.com">www.petdance.com</a> => <a href="AIM:petdance">AIM:petdance</a></div></div></span></span>
</div>
<br></body></html>