Skip to content

Commit

Permalink
Additional tests for deleted in draw_rectangle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov committed May 8, 2021
1 parent 7532de6 commit 5f5b3dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ circuit = [ClassicalDecision(ibegin:iend,ibegin:iend)]
@test circuit2string(circuit) == circuit2string(circuit,mode=:expanded) == "\\begin{quantikz}[transparent, row sep={0.8cm,between origins}]\n\\qw & \\gate[1]{\\;\\;} & \\qw\\\\\n\\cw & \\cwbend{-1} & \\cw\n\\end{quantikz}"
end

@testset "Consecutive gates should not confuse the `deleted` count in `draw_rectangle`" begin
circuit = [MultiControlU("XYZ", [1], [2], [3,4,5]), MultiControlU("U_a", [1], [2], [3,5])]
@test circuit2string(circuit) == circuit2string(circuit,mode=:expanded) == "\\begin{quantikz}[transparent, row sep={0.8cm,between origins}]\n\\qw & \\ctrl{0} & \\ctrl{0} & \\qw\\\\\n\\qw & \\octrl{-1} & \\octrl{-1} & \\qw\\\\\n\\qw & \\gate[3,disable auto height]{XYZ}\\vqw{-1} & \\gate[3,label style={yshift=0.2cm},disable auto height]{U_a}\\vqw{-1} & \\qw\\\\\n\\qw & \\qw & \\linethrough & \\qw\\\\\n\\qw & \\qw & \\qw & \\qw\n\\end{quantikz}"
end

end

function filetests()
Expand Down

2 comments on commit 5f5b3dc

@Krastanov
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/36304

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.7 -m "<description of version>" 5f5b3dc7a8931acdfdde24a905c7a7682b9d03ed
git push origin v1.0.7

Please sign in to comment.