15
15
# - test_MatAlgebra_interface(R)
16
16
17
17
18
- function ConformanceTests . test_NCRing_interface (R:: AbstractAlgebra.NCRing ; reps = 50 )
18
+ function test_NCRing_interface (R:: AbstractAlgebra.NCRing ; reps = 50 )
19
19
20
20
T = elem_type (R)
21
21
@@ -200,17 +200,17 @@ function ConformanceTests.test_NCRing_interface(R::AbstractAlgebra.NCRing; reps
200
200
b = generate_element (R):: T
201
201
c = generate_element (R):: T
202
202
203
- ConformanceTests . test_mutating_op_like_zero (zero, zero!, a)
204
- ConformanceTests . test_mutating_op_like_zero (one, one!, a)
203
+ test_mutating_op_like_zero (zero, zero!, a)
204
+ test_mutating_op_like_zero (one, one!, a)
205
205
206
- ConformanceTests . test_mutating_op_like_neg (- , neg!, a)
206
+ test_mutating_op_like_neg (- , neg!, a)
207
207
208
- ConformanceTests . test_mutating_op_like_add (+ , add!, a, b)
209
- ConformanceTests . test_mutating_op_like_add (- , sub!, a, b)
210
- ConformanceTests . test_mutating_op_like_add (* , mul!, a, b)
208
+ test_mutating_op_like_add (+ , add!, a, b)
209
+ test_mutating_op_like_add (- , sub!, a, b)
210
+ test_mutating_op_like_add (* , mul!, a, b)
211
211
212
- ConformanceTests . test_mutating_op_like_addmul ((a, b, c) -> a + b* c, addmul!, a, b, c)
213
- ConformanceTests . test_mutating_op_like_addmul ((a, b, c) -> a - b* c, submul!, a, b, c)
212
+ test_mutating_op_like_addmul ((a, b, c) -> a + b* c, addmul!, a, b, c)
213
+ test_mutating_op_like_addmul ((a, b, c) -> a - b* c, submul!, a, b, c)
214
214
end
215
215
end
216
216
end
@@ -219,20 +219,20 @@ function ConformanceTests.test_NCRing_interface(R::AbstractAlgebra.NCRing; reps
219
219
end
220
220
221
221
222
- function ConformanceTests . test_Ring_interface (R:: AbstractAlgebra.Ring ; reps = 50 )
222
+ function test_Ring_interface (R:: AbstractAlgebra.Ring ; reps = 50 )
223
223
224
224
T = elem_type (R)
225
225
226
226
@testset " Ring interface for $(R) of type $(typeof (R)) " begin
227
227
228
228
@test T <: RingElement
229
229
230
- ConformanceTests . test_NCRing_interface (R; reps = reps)
230
+ test_NCRing_interface (R; reps = reps)
231
231
232
232
@testset " Basic functionality for commutative rings only" begin
233
233
@test isone (AbstractAlgebra. inv (one (R)))
234
- ConformanceTests . test_mutating_op_like_neg (AbstractAlgebra. inv, inv!, one (R))
235
- ConformanceTests . test_mutating_op_like_neg (AbstractAlgebra. inv, inv!, - one (R))
234
+ test_mutating_op_like_neg (AbstractAlgebra. inv, inv!, one (R))
235
+ test_mutating_op_like_neg (AbstractAlgebra. inv, inv!, - one (R))
236
236
for i in 1 : reps
237
237
a = generate_element (R):: T
238
238
b = generate_element (R):: T
@@ -247,7 +247,7 @@ function ConformanceTests.test_Ring_interface(R::AbstractAlgebra.Ring; reps = 50
247
247
if T isa RingElem
248
248
@test iszero (b) || equality ((b* a) / b, a)
249
249
end
250
- iszero (b) || ConformanceTests . test_mutating_op_like_add (divexact, divexact!, b* a, b)
250
+ iszero (b) || test_mutating_op_like_add (divexact, divexact!, b* a, b)
251
251
else
252
252
try
253
253
t = divexact (b* a, b)
@@ -282,13 +282,13 @@ function ConformanceTests.test_Ring_interface(R::AbstractAlgebra.Ring; reps = 50
282
282
return nothing
283
283
end
284
284
285
- function ConformanceTests . test_Field_interface (R:: AbstractAlgebra.Field ; reps = 50 )
285
+ function test_Field_interface (R:: AbstractAlgebra.Field ; reps = 50 )
286
286
287
287
T = elem_type (R)
288
288
289
289
@testset " Field interface for $(R) of type $(typeof (R)) " begin
290
290
291
- ConformanceTests . test_Ring_interface (R, reps = reps)
291
+ test_Ring_interface (R, reps = reps)
292
292
293
293
@test iszero (R (characteristic (R)))
294
294
@test iszero (characteristic (R) * one (R))
@@ -301,7 +301,7 @@ function ConformanceTests.test_Field_interface(R::AbstractAlgebra.Field; reps =
301
301
if ! is_zero (a)
302
302
@test is_one (a * inv (a))
303
303
@test is_one (inv (a) * a)
304
- ConformanceTests . test_mutating_op_like_neg (inv, inv!, a)
304
+ test_mutating_op_like_neg (inv, inv!, a)
305
305
end
306
306
@test A == a
307
307
end
@@ -310,7 +310,7 @@ function ConformanceTests.test_Field_interface(R::AbstractAlgebra.Field; reps =
310
310
return nothing
311
311
end
312
312
313
- function ConformanceTests . test_EuclideanRing_interface (R:: AbstractAlgebra.Ring ; reps = 20 )
313
+ function test_EuclideanRing_interface (R:: AbstractAlgebra.Ring ; reps = 20 )
314
314
315
315
T = elem_type (R)
316
316
@@ -386,10 +386,10 @@ function ConformanceTests.test_EuclideanRing_interface(R::AbstractAlgebra.Ring;
386
386
@test d == s* f + t* g
387
387
@test gcdinv (f, g) == (d, s)
388
388
389
- ConformanceTests . test_mutating_op_like_add (AbstractAlgebra. div, div!, f, m)
390
- ConformanceTests . test_mutating_op_like_add (mod, mod!, f, m)
391
- ConformanceTests . test_mutating_op_like_add (gcd, gcd!, f, m)
392
- ConformanceTests . test_mutating_op_like_add (lcm, lcm!, f, m)
389
+ test_mutating_op_like_add (AbstractAlgebra. div, div!, f, m)
390
+ test_mutating_op_like_add (mod, mod!, f, m)
391
+ test_mutating_op_like_add (gcd, gcd!, f, m)
392
+ test_mutating_op_like_add (lcm, lcm!, f, m)
393
393
end
394
394
395
395
end
@@ -398,13 +398,13 @@ function ConformanceTests.test_EuclideanRing_interface(R::AbstractAlgebra.Ring;
398
398
end
399
399
400
400
401
- function ConformanceTests . test_Poly_interface (Rx:: AbstractAlgebra.PolyRing ; reps = 30 )
401
+ function test_Poly_interface (Rx:: AbstractAlgebra.PolyRing ; reps = 30 )
402
402
403
403
T = elem_type (Rx)
404
404
405
405
@testset " Poly interface for $(Rx) of type $(typeof (Rx)) " begin
406
406
407
- ConformanceTests . test_Ring_interface (Rx; reps = reps)
407
+ test_Ring_interface (Rx; reps = reps)
408
408
409
409
x = gen (Rx)
410
410
R = base_ring (Rx)
@@ -430,7 +430,7 @@ function ConformanceTests.test_Poly_interface(Rx::AbstractAlgebra.PolyRing; reps
430
430
end
431
431
432
432
if R isa AbstractAlgebra. Field
433
- ConformanceTests . test_EuclideanRing_interface (Rx, reps = 2 + fld (reps, 2 ))
433
+ test_EuclideanRing_interface (Rx, reps = 2 + fld (reps, 2 ))
434
434
@testset " Half-GCD" begin
435
435
for i in 1 : reps
436
436
a = generate_element (Rx)
@@ -480,7 +480,7 @@ function ConformanceTests.test_Poly_interface(Rx::AbstractAlgebra.PolyRing; reps
480
480
end
481
481
482
482
483
- function ConformanceTests . test_MPoly_interface (Rxy:: AbstractAlgebra.MPolyRing ; reps = 30 )
483
+ function test_MPoly_interface (Rxy:: AbstractAlgebra.MPolyRing ; reps = 30 )
484
484
485
485
# for simplicity, these tests for now assume exactly two generators
486
486
@assert ngens (Rxy) == 2
@@ -489,7 +489,7 @@ function ConformanceTests.test_MPoly_interface(Rxy::AbstractAlgebra.MPolyRing; r
489
489
490
490
@testset " MPoly interface for $(Rxy) of type $(typeof (Rxy)) " begin
491
491
492
- ConformanceTests . test_Ring_interface (Rxy; reps = reps)
492
+ test_Ring_interface (Rxy; reps = reps)
493
493
494
494
@testset " Basic functionality" begin
495
495
@test symbols (Rxy) isa Vector{Symbol}
@@ -614,7 +614,7 @@ function ConformanceTests.test_MPoly_interface(Rxy::AbstractAlgebra.MPolyRing; r
614
614
end
615
615
616
616
617
- function ConformanceTests . test_MatSpace_interface (S:: MatSpace ; reps = 20 )
617
+ function test_MatSpace_interface (S:: MatSpace ; reps = 20 )
618
618
619
619
ST = elem_type (S)
620
620
R = base_ring (S)
@@ -714,7 +714,7 @@ function ConformanceTests.test_MatSpace_interface(S::MatSpace; reps = 20)
714
714
return nothing
715
715
end
716
716
717
- function ConformanceTests . test_MatAlgebra_interface (S:: MatRing ; reps = 20 )
717
+ function test_MatAlgebra_interface (S:: MatRing ; reps = 20 )
718
718
719
719
ST = elem_type (S)
720
720
R = base_ring (S)
@@ -724,7 +724,7 @@ function ConformanceTests.test_MatAlgebra_interface(S::MatRing; reps = 20)
724
724
725
725
@testset " MatRing interface for $(S) of type $(typeof (S)) " begin
726
726
727
- ConformanceTests . test_NCRing_interface (S, reps = reps)
727
+ test_NCRing_interface (S, reps = reps)
728
728
729
729
@testset " Constructors" begin
730
730
for k in 1 : reps
@@ -766,19 +766,19 @@ function ConformanceTests.test_MatAlgebra_interface(S::MatRing; reps = 20)
766
766
return nothing
767
767
end
768
768
769
- function ConformanceTests . test_Ring_interface_recursive (R:: AbstractAlgebra.Ring ; reps = 50 )
770
- ConformanceTests . test_Ring_interface (R; reps = reps)
769
+ function test_Ring_interface_recursive (R:: AbstractAlgebra.Ring ; reps = 50 )
770
+ test_Ring_interface (R; reps = reps)
771
771
Rx, _ = polynomial_ring (R, :x )
772
- ConformanceTests . test_Poly_interface (Rx, reps = 2 + fld (reps, 2 ))
772
+ test_Poly_interface (Rx, reps = 2 + fld (reps, 2 ))
773
773
Rxy, _ = polynomial_ring (R, [:x , :y ])
774
- ConformanceTests . test_MPoly_interface (Rxy, reps = 2 + fld (reps, 2 ))
774
+ test_MPoly_interface (Rxy, reps = 2 + fld (reps, 2 ))
775
775
S = matrix_ring (R, rand (0 : 3 ))
776
- ConformanceTests . test_MatAlgebra_interface (S, reps = 2 + fld (reps, 2 ))
776
+ test_MatAlgebra_interface (S, reps = 2 + fld (reps, 2 ))
777
777
S = matrix_space (R, rand (0 : 3 ), rand (0 : 3 ))
778
- ConformanceTests . test_MatSpace_interface (S, reps = 2 + fld (reps, 2 ))
778
+ test_MatSpace_interface (S, reps = 2 + fld (reps, 2 ))
779
779
end
780
780
781
- function ConformanceTests . test_Field_interface_recursive (R:: AbstractAlgebra.Field ; reps = 50 )
782
- ConformanceTests . test_Ring_interface_recursive (R, reps = reps)
783
- ConformanceTests . test_Field_interface (R, reps = reps)
781
+ function test_Field_interface_recursive (R:: AbstractAlgebra.Field ; reps = 50 )
782
+ test_Ring_interface_recursive (R, reps = reps)
783
+ test_Field_interface (R, reps = reps)
784
784
end
0 commit comments