<div dir="ltr">Hi Chris,<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 25, 2018 at 1:51 PM,  <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Chris Cunningham uploaded a new version of KernelTests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/KernelTests-cbc.336.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>trunk/KernelTests-cbc.336.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: KernelTests-cbc.336<br>
Author: cbc<br>
Time: 25 March 2018, 1:51:33.345291 pm<br>
UUID: 6e6b91ac-d706-8f4d-bd60-<wbr>1057109994cb<br>
Ancestors: KernelTests-eem.335<br>
<br>
Test that new xor: takes blocks - but only those that result in booleans.  Others raise errors.<br>
<br>
=============== Diff against KernelTests-eem.335 ===============<br>
<br>
Item was changed:<br>
  ----- Method: FalseTest>>testXor (in category 'tests') -----<br>
  testXor<br>
        self assert: (false xor: true) = true.<br>
        self assert: (false xor: false) = false.<br>
+       self assert: (false xor: [true]) = true.<br>
+       self assert: (false xor: [false]) = false.<br>
+       self should: [false xor: [1]] raise: NonBooleanReceiver.!<br></blockquote><div><br></div><div>Shouldn't "false xor: 1" also raise an error?  I don't see why "false xor: [1]" should raise NonBooleanReceiver specifically.  It should raise an error, but whether [1] or 1 becomes the receiver internally to xor: seems to me an implementation detail.  Surely the receiver in "false xor: [1]" is false and that ids a boolean, so NonBooleanReceiver is an unintuitive error for me :-)</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
-<br>
-       self<br>
-               should: [(false xor: [false])<br>
-                       ifTrue: ["This should never be true, do not signal an Error and let the test fail"]<br>
-                       ifFalse: [self error: 'OK, this should be false, raise an Error']]<br>
-               raise: Error<br>
-               description: 'a Block argument is not allowed. If it were, answer would be false'.!<br>
<br>
Item was changed:<br>
  ----- Method: TrueTest>>testXor (in category 'testing') -----<br>
  testXor<br>
        self assert: (true xor: true) = false.<br>
        self assert: (true xor: false) = true.<br>
+       self assert: (true xor: [true]) = false.<br>
+       self assert: (true xor: [false]) = true.<br>
+       self should: [true xor: [1]] raise: NonBooleanReceiver.!<br>
-<br>
-       self<br>
-               should: [(true xor: [true])<br>
-                       ifTrue: ["This should never be true, do not signal an Error and let the test fail"]<br>
-                       ifFalse: [self error: 'OK, this should be false, raise an Error']]<br>
-               raise: Error<br>
-               description: 'a Block argument is not allowed. If it were, answer would be false'.!<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>