File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 471471
472472 @test all (lhs .≈ rhs)
473473 @test all (lhs_solve .≈ rhs)
474+
475+ @testset " Keyword arguments" begin
476+ expr = sec (x ^ 2 + 4 x + 4 ) ^ 3 - 3
477+ roots = ia_solve (expr, x)
478+ @test length (roots) == 6 # 2 quadratic roots * 3 roots from cbrt(3)
479+ roots = ia_solve (expr, x; complex_roots = false )
480+ @test length (roots) == 2
481+ # the `n` in `θ + n * 2π`
482+ @test length (Symbolics. get_variables (roots[1 ])) == 1
483+ @test length (Symbolics. get_variables (roots[2 ])) == 1
484+ roots = ia_solve (expr, x; complex_roots = false , periodic_roots = false )
485+ @test length (roots) == 2
486+ @test length (Symbolics. get_variables (roots[1 ])) == 0
487+ @test length (Symbolics. get_variables (roots[2 ])) == 0
488+ @test_nowarn eval .(Symbolics. toexpr .(roots))
489+ end
474490end
475491
476492@testset " Sqrt case poly" begin
You can’t perform that action at this time.
0 commit comments