|
@@ -196,17 +196,21 @@ referencedClasses: []
|
|
|
smalltalk.CodeGeneratorTest);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-"_testDynamicDictionaryInnerElementsOrdered",
|
|
|
+"_testInnerTemporalDependentElementsOrdered",
|
|
|
smalltalk.method({
|
|
|
-selector: "testDynamicDictionaryInnerElementsOrdered",
|
|
|
+selector: "testInnerTemporalDependentElementsOrdered",
|
|
|
category: 'tests',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
+smalltalk.send(self,"_should_return_",["foo\x0a | x |\x0a x := Array.\x0a ^ x with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",[smalltalk.send("foo","__minus_gt",[(smalltalk.Array || Array)]),smalltalk.send("bar","__minus_gt",[(2)])]]);
|
|
|
+smalltalk.send(self,"_should_return_",["foo\x0a | x |\x0a x := 1.\x0a ^ Array with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",[smalltalk.send("foo","__minus_gt",[(1)]),smalltalk.send("bar","__minus_gt",[(2)])]]);
|
|
|
+smalltalk.send(self,"_should_return_",["foo\x0a | x |\x0a x := 1.\x0a ^ { 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",[smalltalk.send("foo","__minus_gt",[(1)]),smalltalk.send("bar","__minus_gt",[(2)])]]);
|
|
|
+smalltalk.send(self,"_should_return_",["foo\x0a | x |\x0a x := 1.\x0a ^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",smalltalk.HashedCollection._fromPairs_([smalltalk.send("foo","__minus_gt",[(1)]),smalltalk.send("bar","__minus_gt",[(2)])])]);
|
|
|
return self},
|
|
|
args: [],
|
|
|
-source: "testDynamicDictionaryInnerElementsOrdered\x0a\x22This test is commented out.\x0aThe treatment that help in case of send node,\x0adynamic array node and testDynamicDictionaryElementsOrdered\x0acases, does not help here\x22\x0a\x0a\x22\x09self should: 'foo\x0a | x |\x0a x := 1.\x0a ^ #{ ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.\x0a\x22",
|
|
|
-messageSends: [],
|
|
|
-referencedClasses: []
|
|
|
+source: "testInnerTemporalDependentElementsOrdered\x0a\x09self should: 'foo\x0a | x |\x0a x := Array.\x0a ^ x with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->Array. 'bar'->2}.\x0a\x09self should: 'foo\x0a | x |\x0a x := 1.\x0a ^ Array with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a | x |\x0a x := 1.\x0a ^ { ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a | x |\x0a x := 1.\x0a ^ #{ ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.\x0a",
|
|
|
+messageSends: ["should:return:", "->"],
|
|
|
+referencedClasses: ["Array"]
|
|
|
}),
|
|
|
smalltalk.CodeGeneratorTest);
|
|
|
|