1
0
Kaynağa Gözat

- Fixed issue #356
- Added SetTest >> testComparing

Nicolas Petton 12 yıl önce
ebeveyn
işleme
d41f9ddeb6

Dosya farkı çok büyük olduğundan ihmal edildi
+ 124 - 124
js/Kernel-Collections.deploy.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 124 - 124
js/Kernel-Collections.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 121 - 121
js/Kernel-Tests.deploy.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 121 - 121
js/Kernel-Tests.js


+ 1 - 1
st/Kernel-Collections.st

@@ -1446,7 +1446,7 @@ remove: anObject
 
 
 = aCollection
 = aCollection
 	^self class = aCollection class and: [
 	^self class = aCollection class and: [
-		elements = aCollection asArray]
+		self asArray = aCollection asArray]
 ! !
 ! !
 
 
 !Set methodsFor: 'converting'!
 !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
 	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
 testPrintString
 	| set |
 	| set |
 	set := Set new.
 	set := Set new.

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor