1
0
Ver Fonte

- Fixed issue #356
- Added SetTest >> testComparing

Nicolas Petton há 12 anos atrás
pai
commit
d41f9ddeb6
6 ficheiros alterados com 497 adições e 491 exclusões
  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

Diff do ficheiro suprimidas por serem muito extensas
+ 124 - 124
js/Kernel-Collections.deploy.js


Diff do ficheiro suprimidas por serem muito extensas
+ 124 - 124
js/Kernel-Collections.js


Diff do ficheiro suprimidas por serem muito extensas
+ 121 - 121
js/Kernel-Tests.deploy.js


Diff do ficheiro suprimidas por serem muito extensas
+ 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.

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff