Skip to content

Commit 6594df8

Browse files
committed
add a test for macro hygiene when using import
1 parent 98be11f commit 6594df8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/mono.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ facts("Vector to Monomial Vector") do
1515
@fact MonomialVector([1]) --> MonomialVector(PolyVar[], [Int[]])
1616
@fact MonomialVector([x]) --> MonomialVector([x], [[1]])
1717
end
18+
module newmodule
19+
using FactCheck
20+
import MultivariatePolynomials
21+
facts("Polyvar macro hygiene") do
22+
# Verify that the @polyvar macro works when the package has been activated
23+
# with `import` instead of `using`.
24+
MultivariatePolynomials.@polyvar x y
25+
@fact isa(x, MultivariatePolynomials.PolyVar) --> true
26+
@fact isa(y, MultivariatePolynomials.PolyVar) --> true
27+
end
28+
end

0 commit comments

Comments
 (0)