@@ -629,25 +629,25 @@ check_leaks()
629
629
@testset " test scalar math" begin
630
630
a = drand (20 , 20 );
631
631
b = convert (Array, a)
632
- @testset " $f " for f in (: abs , : abs2 , : acos , : acosd , : acot ,
633
- : acotd , : acsch , : angle , : asech , : asin ,
634
- : asind , : asinh , : atan , : atand , : atanh ,
635
- : big , : cbrt , : ceil , : cis , : complex , : conj ,
636
- : cos , : cosc , : cosd , : cosh , : cospi , : cot ,
637
- : cotd , : coth , : csc , : cscd , : csch , : dawson ,
638
- : deg2rad , : digamma , : erf , : erfc , : erfcinv ,
639
- : erfcx , : erfi , : erfinv , : exp , : exp10 , : exp2 ,
640
- : expm1 , : exponent , : float , : floor , : gamma , : imag ,
641
- : invdigamma , : isfinite , : isinf , : isnan , : lfact ,
642
- : lgamma , : log , : log10 , : log1p , : log2 , : rad2deg , : real ,
643
- : sec , : secd , : sech , : sign , : sin , : sinc , : sind ,
644
- : sinh , : sinpi , : sqrt , : tan , : tand , : tanh , : trigamma )
645
- @test ( eval (f)) (a) == ( eval (f)) (b)
632
+ @testset " $f " for f in (- , abs, abs2, acos, acosd, acot,
633
+ acotd, acsch, angle, asech, asin,
634
+ asind, asinh, atan, atand, atanh,
635
+ big, cbrt, ceil, cis, complex, conj,
636
+ cos, cosc, cosd, cosh, cospi, cot,
637
+ cotd, coth, csc, cscd, csch, dawson,
638
+ deg2rad, digamma, erf, erfc, erfcinv,
639
+ erfcx, erfi, erfinv, exp, exp10, exp2,
640
+ expm1, exponent, float, floor, gamma, imag,
641
+ invdigamma, isfinite, isinf, isnan, lfact,
642
+ lgamma, log, log10, log1p, log2, rad2deg, real,
643
+ sec, secd, sech, sign, sin, sinc, sind,
644
+ sinh, sinpi, sqrt, tan, tand, tanh, trigamma)
645
+ @test f (a) == f (b)
646
646
end
647
647
a = a + 1
648
648
b = b + 1
649
- @testset " $f " for f in (: asec , : asecd , : acosh , : acsc , : acscd , : acoth )
650
- @test ( eval (f)) (a) == ( eval (f)) (b)
649
+ @testset " $f " for f in (asec, asecd, acosh, acsc, acscd, acoth)
650
+ @test f (a) == f (b)
651
651
end
652
652
close (a)
653
653
darray_closeall () # close the temporaries created above
@@ -708,27 +708,27 @@ check_leaks()
708
708
c = drand (20 ,20 )
709
709
d = convert (Array, c)
710
710
711
- @testset " $f " for f in (: + , : - , : .+ , : .- , : .* , : ./ , : .% , : div , : mod )
711
+ @testset " $f " for f in (+ , - , .+ , .- , .* , ./ , .% , div, mod)
712
712
x = rand ()
713
- @test ( eval (f)) (a, x) == ( eval (f)) (b, x)
714
- @test ( eval (f)) (x, a) == ( eval (f)) (x, b)
715
- @test ( eval (f)) (a, c) == ( eval (f)) (b, d)
713
+ @test f (a, x) == f (b, x)
714
+ @test f (x, a) == f (x, b)
715
+ @test f (a, c) == f (b, d)
716
716
end
717
717
718
718
close (a)
719
719
close (c)
720
720
721
721
a = dones (Int, 20 , 20 )
722
722
b = convert (Array, a)
723
- @testset " $f " for f in (: .<< , : .>> )
724
- @test ( eval (f)) (a, 2 ) == ( eval (f)) (b, 2 )
725
- @test ( eval (f)) (2 , a) == ( eval (f)) (2 , b)
726
- @test ( eval (f)) (a, a) == ( eval (f)) (b, b)
723
+ @testset " $f " for f in (.<< , .>> )
724
+ @test f (a, 2 ) == f (b, 2 )
725
+ @test f (2 , a) == f (2 , b)
726
+ @test f (a, a) == f (b, b)
727
727
end
728
728
729
- @testset " $f " for f in (: rem ,)
729
+ @testset " $f " for f in (rem,)
730
730
x = rand ()
731
- @test ( eval (f)) (a, x) == ( eval (f)) (b, x)
731
+ @test f (a, x) == f (b, x)
732
732
end
733
733
close (a)
734
734
close (c)
0 commit comments