Skip to content

Commit

Permalink
test what happens when there is no RE
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Sep 1, 2023
1 parent dd6897b commit d820e0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/grouping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@ end

@test_throws(ArgumentError("Same variable appears on both sides of |"),
schematize(@formula(y ~ 1 + (x|x)), d, contrasts))
f1 = schematize(@formula(y ~ 1 + x + z), d, contrasts)
f2 = apply_schema(@formula(y ~ 1 + x + z), schema(d, contrasts))
# skip intercept term
@test all(a.contrasts == b.contrasts for (a, b) in zip(f1.rhs.terms[2:end], f2.rhs.terms[2:end]))
end

0 comments on commit d820e0a

Please sign in to comment.