File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 201
201
@test isequal (expand_derivatives (D (sin (t) * foo (t))), cos (t) * foo (t) + sin (t) * D (foo (t)))
202
202
203
203
end
204
+
205
+ foo (args... ;kw... ) = args, kw
206
+ pp = :name => :cool_name
207
+
208
+ @named cool_name = foo ()
209
+ @test collect (cool_name) == [pp]
210
+
211
+ @named cool_name = foo (42 )
212
+ @test cool_name[1 ] == (42 ,)
213
+ @test collect (cool_name[2 ]) == [pp]
214
+
215
+ @named cool_name = foo (42 ; a = 2 )
216
+ @test cool_name[1 ] == (42 ,)
217
+ @test collect (cool_name[2 ]) == [:a => 2 ; pp]
218
+
219
+ @named cool_name = foo (a = 2 )
220
+ @test collect (cool_name) == [:a => 2 ; pp]
221
+
222
+ @named cool_name = foo (;a = 2 )
223
+ @test collect (cool_name) == [:a => 2 ; pp]
224
+
225
+ @named cool_name = foo (name = 2 )
226
+ @test collect (cool_name) == [:name => 2 ]
227
+
228
+ @named cool_name = foo (42 ; name = 3 )
229
+ @test cool_name[1 ] == (42 ,)
230
+ @test collect (cool_name[2 ]) == [:name => 3 ]
You can’t perform that action at this time.
0 commit comments