Skip to content

Commit

Permalink
[ToricVarieties] Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAround committed Sep 9, 2023
1 parent 7ef9e4d commit 5756189
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AlgebraicGeometry/ToricVarieties/Proj/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions test/AlgebraicGeometry/ToricVarieties/proj.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5756189

Please sign in to comment.