瀏覽代碼

- Fixed issue #356
- Added SetTest >> testComparing

Nicolas Petton 12 年之前
父節點
當前提交
d41f9ddeb6
共有 6 個文件被更改,包括 497 次插入491 次删除
  1. 124 124
      js/Kernel-Collections.deploy.js
  2. 124 124
      js/Kernel-Collections.js
  3. 121 121
      js/Kernel-Tests.deploy.js
  4. 121 121
      js/Kernel-Tests.js
  5. 1 1
      st/Kernel-Collections.st
  6. 6 0
      st/Kernel-Tests.st

File diff suppressed because it is too large
+ 124 - 124
js/Kernel-Collections.deploy.js


File diff suppressed because it is too large
+ 124 - 124
js/Kernel-Collections.js


File diff suppressed because it is too large
+ 121 - 121
js/Kernel-Tests.deploy.js


File diff suppressed because it is too large
+ 121 - 121
js/Kernel-Tests.js


+ 1 - 1
st/Kernel-Collections.st

@@ -1446,7 +1446,7 @@ remove: anObject
 
 = aCollection
 	^self class = aCollection class and: [
-		elements = aCollection asArray]
+		self asArray = aCollection asArray]
 ! !
 
 !Set methodsFor: 'converting'!

+ 6 - 0
st/Kernel-Tests.st

@@ -1484,6 +1484,12 @@ testCollect
 	self assert: #(0 2) equals: (#(5 6 8) asSet collect: [ :x | x \\ 3 ]) asArray sorted
 !
 
+testComparing
+	self assert: #(0 2) asSet equals: #(0 2) asSet.
+    self deny: #(0 2 3) asSet = #(0 2) asSet.
+    self deny: #(1 2) asSet = #(0 2) asSet
+!
+
 testPrintString
 	| set |
 	set := Set new.

Some files were not shown because too many files changed in this diff