Skip to content

Commit

Permalink
add test for default reduce!(::RewritingSystem)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalmarek committed Oct 2, 2023
1 parent 6f77edd commit 10ccd50
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/test_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ function test_kbs2_methods(R, methods, len; kwargs...)
end

@testset "KBS2 examples" begin
R = RWS_Example_5_1()
rws = KnuthBendix.knuthbendix(KnuthBendix.KBS2AlgPlain(), R)
@test KnuthBendix.nrules(rws) == 8
@test Set(collect(KnuthBendix.rules(R))[1:5]) ==
Set(collect(KnuthBendix.rules(rws))[1:5])
@test isconfluent(rws)
let R = RWS_Example_5_1(), nrules = 8
rws = KnuthBendix.knuthbendix(KnuthBendix.KBS2AlgPlain(), R)
@test KnuthBendix.nrules(rws) == nrules
@test Set(collect(KnuthBendix.rules(R))[1:5]) ==
Set(collect(KnuthBendix.rules(rws))[1:5])
@test isconfluent(rws)
@test KnuthBendix.nrules(KnuthBendix.reduce!(rws)) == nrules
end

R = RWS_Example_5_2()
@test_logs (:warn,) KnuthBendix.knuthbendix(
Expand Down

0 comments on commit 10ccd50

Please sign in to comment.