Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002387 [Squeak 5.2] any major always 12-20-05 02:51 12-20-05 02:51
Reporter tak View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0002387: 'abc' = 'abc' asWideString wasn't returning true after the String refactoring.
Description StringEqual2.cs

'abc' = 'abc' asWideString wasn't returning true after the String refactoring. Supposedly, primitiveCompareString should fail when the argument or receiver isn't a byte object, but currently the primitive just traverses the internal of the word object. The right fix would be to fix the primitive, but so far the Squeak side code should cope with it.

self assert: 'abc' = 'abc' asWideString.
self assert: 'abc' asWideString = 'abc'.
self assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString ~= 'a000' asWideString).
self assert: ('a000' asWideString ~= (ByteArray with: 97 with: 0 with: 0 with: 0) asString).

self assert: ('abc' sameAs: 'aBc' asWideString).
self assert: ('aBc' asWideString sameAs: 'abc').
self assert: ((ByteArray with: 97 with: 0 with: 0 with: 0) asString sameAs: 'Abcd' asWideString) not.
self assert: ('a000' asWideString sameAs: (ByteArray with: 97 with: 0 with: 0 with: 0) asString) not.
Additional Information This patch is originally posted by Yoshiki http://www.kukakuka.jp/squeak/bugs/view.php?id=56. [^]
Attached Files  StringEqual2.cs [^] (3,897 bytes) 12-20-05 02:51

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
12-20-05 02:51 tak New Issue
12-20-05 02:51 tak File Added: StringEqual2.cs
12-20-05 02:51 tak Additional Information Updated


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
31 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker