From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- PyGan/data/test_lifo.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 PyGan/data/test_lifo.py (limited to 'PyGan/data/test_lifo.py') diff --git a/PyGan/data/test_lifo.py b/PyGan/data/test_lifo.py new file mode 100644 index 0000000..552adbe --- /dev/null +++ b/PyGan/data/test_lifo.py @@ -0,0 +1,37 @@ +# +# test_lifo: non regression testing for lifo class +# +import lifo +import lcm +from assertS import * +import numpy as np +x=lifo.new() +x._impx=1 +x.push('tata') +x.push(int) +x.push(12345678) +x.push(2.5) +x.push(3.5) +x.push(float) +x.pushEmpty("my_new_LCM_object","LCM") +x.push('this is very looong text') +val=x.node(3) +print("val(3)=",val) +val=x.pop() +print("val(pop)=",val) +ilen=x.getMax() +print("stack length=",ilen) +my_lcm=lcm.new('LCM_INP','nonfuel') +x.push(my_lcm) +x.push('more text') +new_lcm=x.node('nonfuel') +print("stack content before popping the lcm node") +x.lib() +x.pop() +x.pop() +print("stack content after popping twice the lcm node") +x.lib() +new_lcm.lib() +microlib=new_lcm['REFL']['MIXTURES'][0]['CALCULATIONS'][0] +assertS(microlib,'ISOTOPESTEMP',0,5.23150024E+02) +print("test test_lifo completed") -- cgit v1.2.3