1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-29 11:00:28 +01:00

use test_warn to suppress warnings

This commit is contained in:
kalmarek 2017-09-14 17:33:00 +02:00
parent 505295aa5a
commit cacef5f08a

View File

@ -127,13 +127,17 @@ using Nemo
@test eltype(2*a) == typeof(2) @test eltype(2*a) == typeof(2)
@test (2*a).coeffs == 2.*(a.coeffs) @test (2*a).coeffs == 2.*(a.coeffs)
@test isa(2.0*a, GroupRingElem) ww = "Scalar and coeffs are in different rings! Promoting result to Float64"
@test eltype(2.0*a) == typeof(2.0)
@test (2.0*a).coeffs == 2.0.*(a.coeffs)
@test isa(a/2, GroupRingElem) @test isa(2.0*a, GroupRingElem)
@test eltype(a/2) == typeof(1/2) @test_warn ww eltype(2.0*a) == typeof(2.0)
@test (a/2).coeffs == 0.5*(a.coeffs) @test_warn ww (2.0*a).coeffs == 2.0.*(a.coeffs)
@test_warn ww (a/2).coeffs == a.coeffs./2
b = a/2
@test isa(b, GroupRingElem)
@test eltype(b) == typeof(1/2)
@test (b/2).coeffs == 0.25*(a.coeffs)
@test isa(convert(Rational{Int}, a), GroupRingElem) @test isa(convert(Rational{Int}, a), GroupRingElem)
@test eltype(convert(Rational{Int}, a)) == Rational{Int} @test eltype(convert(Rational{Int}, a)) == Rational{Int}