From bb337b3b7618bd4e7b319fb5a4607fe10280724f Mon Sep 17 00:00:00 2001 From: Jukka Aho Date: Sat, 27 Jun 2015 18:46:07 +0300 Subject: [PATCH] add test to throw error when element type is unknown --- test/test_abaqus_reader.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/test_abaqus_reader.jl b/test/test_abaqus_reader.jl index 4274e13..6bc1d76 100644 --- a/test/test_abaqus_reader.jl +++ b/test/test_abaqus_reader.jl @@ -5,7 +5,7 @@ using FactCheck using Logging @Logging.configure(level=INFO) -using JuliaFEM.abaqus_reader: parse_abaqus +using JuliaFEM.abaqus_reader: parse_abaqus, parse_element_section facts("test import abaqus model") do fid = open("../geometry/3d_beam/palkki.inp") @@ -18,3 +18,14 @@ facts("test import abaqus model") do @fact length(model["nsets"]["LOAD"]) => 9 @fact length(model["nsets"]["TOP"]) => 83 end + +facts("test that reader throws error when dimension information of elemenet is missing") do +# *ELEMENT, TYPE=neverseenbefore, ELSET=Body1 + data = """ + 1, 243, 240, 191, 117, 245, 242, 244, + 1, 2, 196 + """ + model = Dict() + header = Dict("section"=>"ELEMENT", "options" => Dict("TYPE" => "neverseenbefore", "ELSET"=>"Body1")) + @fact_throws parse_element_section(model, header, data) +end