mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-21 18:33:36 +00:00
test(mesh): cover Gmsh stub errors without the Gmsh extension
Add a focused test file asserting read_gmsh_msh raises ErrorException and mesh_from_current_gmsh_model stays undefined until JuliaFEMGmshExt loads. - Add test_gmsh_stub.jl with two throws checks for the weakdep path - Include the new file from test/mesh/runtests.jl next to existing mesh tests
This commit is contained in:
@@ -7,3 +7,4 @@ using Tensors
|
||||
|
||||
include("test_refine.jl")
|
||||
include("test_mesh_api.jl")
|
||||
include("test_gmsh_stub.jl")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2015-2026 Jukka Aho
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
using Test
|
||||
using JuliaFEM
|
||||
|
||||
@testset "Gmsh bridge stubs (extension not loaded)" begin
|
||||
@test_throws ErrorException JuliaFEM.read_gmsh_msh("nonexistent.msh")
|
||||
@test_throws MethodError JuliaFEM.mesh_from_current_gmsh_model()
|
||||
end
|
||||
Reference in New Issue
Block a user