diff --git a/src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl b/src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl index d64664e8178c..90f7fe73a8f1 100644 --- a/src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl +++ b/src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl @@ -33,7 +33,7 @@ function proj(E::ToricDivisor...) end function proj() - @req false "The direct sum is empty." + error("The direct sum is empty") end function _proj_and_total_space(is_proj::Bool, E::Vector{T}) where T <: Union{ToricDivisor, ToricLineBundle} @@ -140,5 +140,5 @@ function total_space(E::ToricDivisor...) end function total_space() - @req false "The direct sum is empty." + error("The direct sum is empty") end diff --git a/test/AlgebraicGeometry/ToricVarieties/proj.jl b/test/AlgebraicGeometry/ToricVarieties/proj.jl index ea435f825f86..51dd20b356b7 100644 --- a/test/AlgebraicGeometry/ToricVarieties/proj.jl +++ b/test/AlgebraicGeometry/ToricVarieties/proj.jl @@ -1,3 +1,6 @@ +using Oscar +using Test + @testset "Projectivization of direct sum of line bundles on toric space (set_attributes = $set_attributes)" for set_attributes in [true, false] P1 = projective_space(NormalToricVariety, 1; set_attributes) @testset "Test of the Hirzebruch surfaces from 0 to 10" begin