From 2df2dd7bd6931b57860d0b521d494c57880f08fd Mon Sep 17 00:00:00 2001 From: kalmar Date: Wed, 5 Jul 2017 16:21:16 +0200 Subject: [PATCH] add tests catching the problems --- test/FreeGroup-tests.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/FreeGroup-tests.jl b/test/FreeGroup-tests.jl index 1494264..11c3fda 100644 --- a/test/FreeGroup-tests.jl +++ b/test/FreeGroup-tests.jl @@ -131,5 +131,12 @@ end @test Groups.replace(s*c*t^-1, 1, w, subst[w]) == s^2*t^-2 @test Groups.replace(t*c*t, 2, w, subst[w]) == t*s @test Groups.replace_all!(s*c*s*c*s, subst) == s*t^4*s*t^4*s + + G = FreeGroup(["x", "y"]) + x,y = Nemo.gens(G) + + @test Groups.replace(x*y^9, 2, y^2, y) == x*y^8 + @test Groups.replace(x^3, 1, x^2, y) == x*y + @test Groups.replace(y*x^3*y, 2, x^2, y) == y*x*y^2 end end