Bläddra i källkod

- Fixed DictionaryTest>>testDynamicDictionary

Nicolas Petton 12 år sedan
förälder
incheckning
fdfae555ba
3 ändrade filer med 5 tillägg och 5 borttagningar
  1. 1 1
      js/Kernel-Tests.deploy.js
  2. 3 3
      js/Kernel-Tests.js
  3. 1 1
      st/Kernel-Tests.st

+ 1 - 1
js/Kernel-Tests.deploy.js

@@ -150,7 +150,7 @@ smalltalk.method({
 selector: 'testDynamicDictionaries',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.HashedCollection._fromPairs_([smalltalk.send((1), "__minus_gt", ["hello"]),smalltalk.send((2), "__minus_gt", ["world"])]), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_with_with_", [smalltalk.send((1), "__minus_gt", ["hello"]), smalltalk.send((2), "__minus_gt", ["world"])])])]);
+smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.HashedCollection._fromPairs_([smalltalk.send("hello", "__minus_gt", [(1)])]), "_asDictionary", []), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_with_", [smalltalk.send("hello", "__minus_gt", [(1)])])])]);
 return self;}
 }),
 smalltalk.DictionaryTest);

+ 3 - 3
js/Kernel-Tests.js

@@ -206,11 +206,11 @@ selector: unescape('testDynamicDictionaries'),
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.HashedCollection._fromPairs_([smalltalk.send((1), "__minus_gt", ["hello"]),smalltalk.send((2), "__minus_gt", ["world"])]), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_with_with_", [smalltalk.send((1), "__minus_gt", ["hello"]), smalltalk.send((2), "__minus_gt", ["world"])])])]);
+smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.HashedCollection._fromPairs_([smalltalk.send("hello", "__minus_gt", [(1)])]), "_asDictionary", []), "__eq", [smalltalk.send((smalltalk.Dictionary || Dictionary), "_with_", [smalltalk.send("hello", "__minus_gt", [(1)])])])]);
 return self;},
 args: [],
-source: unescape('testDynamicDictionaries%0A%09self%20assert%3A%20%23%7B1%20-%3E%20%27hello%27.%202%20-%3E%20%27world%27%7D%20%3D%20%28Dictionary%20with%3A%201%20-%3E%20%27hello%27%20with%3A%202%20-%3E%20%27world%27%29'),
-messageSends: ["assert:", unescape("%3D"), unescape("-%3E"), "with:with:"],
+source: unescape('testDynamicDictionaries%0A%09self%20assert%3A%20%23%7B%27hello%27%20-%3E%201%7D%20asDictionary%20%3D%20%28Dictionary%20with%3A%20%27hello%27%20-%3E%201%29'),
+messageSends: ["assert:", unescape("%3D"), "asDictionary", unescape("-%3E"), "with:"],
 referencedClasses: ["Dictionary"]
 }),
 smalltalk.DictionaryTest);

+ 1 - 1
st/Kernel-Tests.st

@@ -95,7 +95,7 @@ testEquality
 !
 
 testDynamicDictionaries
-	self assert: #{1 -> 'hello'. 2 -> 'world'} = (Dictionary with: 1 -> 'hello' with: 2 -> 'world')
+	self assert: #{'hello' -> 1} asDictionary = (Dictionary with: 'hello' -> 1)
 !
 
 testAccessing