Skip to content

Commit 41c6d5c

Browse files
committed
Added test for copying.
Apparently the new copy function works. Added a test in test/tests.jl
1 parent e6f85c3 commit 41c6d5c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/tests.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ pS3 = Poly([1, 2, 3, 4, 5], :s)
8787
@test_throws ErrorException pS1 / pX
8888
@test_throws ErrorException pS1 % pX
8989

90+
#Testing copying.
91+
pcpy1 = Poly([1,2,3,4,5], :y)
92+
pcpy2 = copy(pcpy1)
93+
@test pcpy1 == pcpy2
94+
9095
#Tests for Pade approximants
9196

9297
println("Test for the exponential function.")
@@ -112,4 +117,4 @@ d = Poly(convert(Vector{BigInt},(-1).^(0:60).*gamma(BigFloat("1.0"):BigFloat("61
112117
PQexpint = Pade(d,30,30)
113118
println("The approximate sum of the divergent series is: ",float64(padeval(PQexpint,1.0)))
114119
println("The approximate sum of the convergent series is: ",exp(1)*(-γ-sum([(-1).^k/k./gamma(k+1) for k=1:20])))
115-
@test isapprox(padeval(PQexpint,1.0) , exp(1)*(-γ-sum([(-1).^k/k./gamma(k+1) for k=1:20])))
120+
@test isapprox(padeval(PQexpint,1.0) , exp(1)*(-γ-sum([(-1).^k/k./gamma(k+1) for k=1:20])))

0 commit comments

Comments
 (0)