From f005b157c03cd06ca97d152702d0b0f324ad10c2 Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Wed, 18 Sep 2024 17:54:04 +0200 Subject: [PATCH] Test `setcoeff!` --- test/flint/fq_nmod_poly-test.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/flint/fq_nmod_poly-test.jl b/test/flint/fq_nmod_poly-test.jl index 9fd1f7bf7..4dae83da0 100644 --- a/test/flint/fq_nmod_poly-test.jl +++ b/test/flint/fq_nmod_poly-test.jl @@ -580,3 +580,11 @@ end @test_throws ErrorException x+a end + +@testset "setcoeff!" begin + F = Native.GF(3, 2) + Fx, x = F["x"] + f = x^2 + x + 1 + setcoeff!(f, 1, ZZ(2)) + @test f == x^2 + 2*x + 1 +end