using Test
using Example2018

# Polynomial form a ring
#1. addition is associative
#2. additive identity
#3. additive inverse
#4. addition commutes
#5. multiplication is ...


@testset "Polynomials form a ring" begin
    z = Polynomial([0])
    p = Polynomial([1,2,3])
    for n in 1:100
        deg = rand(0:100)
        p = Polynomial(rand(-100000:100000, deg+1))
      
        @test p + z == p
        @test z + p == p 
        @test p + (-p) == z
   end

end

