Skip to content
Snippets Groups Projects
Unverified Commit 30af2698 authored by Lucas Ondel Yang's avatar Lucas Ondel Yang
Browse files

added test reverse

parent 3113a429
Branches
Tags
No related merge requests found
......@@ -74,7 +74,7 @@ end
Return the reversal of A.
"""
Base.reverse(A::AbstractFSA) = FSA(ω(A), T(A)', α(A), ρ(A), λ(A))
Base.reverse(A::AbstractFSA) = FSA(ω(A), copy(T(A)'), α(A), ρ(A), λ(A))
"""
renorm(A::FSA)
......
......@@ -90,6 +90,12 @@ end
@test cs_cB2p.tval[2] == cs_B2p_n3.tval[2]
@test cs_cB2.tval[1] cs_B2_n3.tval[1]
@test cs_cB2.tval[2] == cs_B2_n3.tval[2]
# reverse
rB2 = convert((w, l) -> f(L, w, l), A2 |> reverse)
s1 = val(cumsum(B2).tval[2])
s2 = Set((StringMonoid reverse val).((val cumsum)(rB2)[2]))
@test s1 == s2
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment