Skip to content

Commit

Permalink
test(wordcloud): add test case for scheme reproduction
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Sep 30, 2024
1 parent 26b4a8c commit fab596e
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 @@ -41,6 +41,11 @@ include("test_textprocessing.jl")
mask=shape(squircle, 200, 150, color=0.15, rt=2.2), density=0.45, transparent=(1, 1, 1, 0)) # String & small mask
@test_throws AssertionError wordcloud(["1"], [2,3], density=0.1) |> generate! # length unmatch
@test_throws AssertionError wordcloud(String[], Int[], density=0.1) |> generate! # empty inputs
wc2 = wordcloud("a new word cloud"; getscheme(wc)...)
@test wc.mask === wc2.mask
@test wc.svgmask === wc2.svgmask
@test getscheme(wc) == getscheme(wc2)

##############no mask file
wc = wordcloud(["test"], [1], maskcolor="green", outline=5)
@test WordCloud.alpha(parsecolor(getbackgroundcolor(wc))) == 0
Expand Down

2 comments on commit fab596e

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/116305

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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.2.0 -m "<description of version>" fab596e62feac6a5e6edf738333537bcba21d7ca
git push origin v1.2.0

Please sign in to comment.