File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,14 @@ insulate("async await test", function()
129
129
end )
130
130
131
131
it (" check task return value" , function ()
132
- assert .spy (print ).was_called_with ((" Ending %s with %d" ):format (" a" , randoms [1 ]))
133
- assert .spy (print ).was_called_with ((" Ending %s with %d" ):format (" b" , randoms [2 ]))
134
- assert .spy (print ).was_called_with ((" sum is %d" ):format (randoms [1 ] + randoms [2 ]))
132
+ randoms .init ()
133
+
134
+ local v1 = math.random (100 )
135
+ local v2 = math.random (100 )
136
+
137
+ assert .spy (print ).was_called_with ((" Ending %s with %d" ):format (" a" , v1 ))
138
+ assert .spy (print ).was_called_with ((" Ending %s with %d" ):format (" b" , v2 ))
139
+ assert .spy (print ).was_called_with ((" sum is %d" ):format (v1 + v2 ))
135
140
assert .spy (print ).was_called (7 )
136
141
end )
137
142
end )
You can’t perform that action at this time.
0 commit comments