From 6f35ff3313bb03962eadf5284116c44b91a0b15c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Fri, 18 Aug 2023 15:01:17 +0100 Subject: [PATCH] tests/weaschem: correct tests for parse_id_map --- .tests/parse/file/weaschem_id_map.test.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.tests/parse/file/weaschem_id_map.test.lua b/.tests/parse/file/weaschem_id_map.test.lua index c397bc8..72c3478 100644 --- a/.tests/parse/file/weaschem_id_map.test.lua +++ b/.tests/parse/file/weaschem_id_map.test.lua @@ -15,16 +15,12 @@ local function get_string(test_name) end local epsilon = 0.000001 -local function validate_id_map(idmap, is_delta) +local function validate_id_map(idmap) for node_id, node_name in pairs(idmap) do assert.are.same("number", type(node_id)) assert.are.same("string", type(node_name)) assert.is_true(node_id - math.floor(node_id) < epsilon) - if is_delta then - assert.is_true(node_id >= -2) - else - assert.is_true(node_id >= -1) - end + assert.is_true(node_id >= 0) end end