<div class="gmail_quote">On Thu, Nov 13, 2008 at 2:44 PM, Philippe Marschall <span dir="ltr"><<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">2008/11/13, John O'Keefe <<a href="mailto:wembley.instantiations@gmail.com">wembley.instantiations@gmail.com</a>>:<br>
<div class="Ih2E3d">> I have been getting failures in my port of the JSJson tests (example, self<br>> assert: (self parse: 'True') = 'True'). These failures were a bit of a<br>> mystery to me since on VA Smalltalk "self parse: 'True'" answers a Symbol,<br>
> not a String. But on delving into Squeak, all is now clear -- it answers a<br>> Symbol there also!<br><br></div>That looks like a bug in the test or in the Squeak implementation. The<br>Seaside coding conventions are quite clear in this area, you can't<br>
assume that a Symbol is a String. So either the test or the Squeak<br>implementation is broken.<br><br>It probably couldn't hurt to document the type assumptions along the lines of:<br><br>assert: (self parse: 'True') class = #True class<br>
<br>or:<br><br>assert: (self parse: 'True') isSymbol<br><br>Cheers<br><font color="#888888">Philippe<br></font>
<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>seaside-dev mailing list<br><a href="mailto:seaside-dev@lists.squeakfoundation.org">seaside-dev@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev</a><br>
</div></div></blockquote>
<div>I think I'll go with an identity test for the tests that should answer a Symbol:</div>
<div> </div>
<div> assert: (self parse: 'True') == #True</div>
<div> </div>
<div>That will defeat the odd equality implementation on Squeak.</div>
<div> </div>
<div>John</div></div>