Commit c9c9dd97 authored by Miguel Angel Gonzalez's avatar Miguel Angel Gonzalez
Browse files

Added list of failed tests to final output

parent ccce2140
......@@ -34,6 +34,7 @@ KP_path = path_for_online
KP_inst = inst_value
nbE = 0
nbT = 0B
failed_tests = []
W_managed = widget_info(/managed) ; Keep already managed widgets
on_ioerror,miswrite
......@@ -49,7 +50,7 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
W_test = dist(10)
W_tot = total(W_test)
......@@ -58,7 +59,7 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
GIVE_DATP, {E:sqrt(W_test), N:1, W_tit:'Test'}, W=1
SEE,/beside,W=1
RDSET,path=P_to_DATA, inst='NeXus'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if !error_state.msg gt ' ' then return
endelse
lamp_test_clean, W_managed
......@@ -71,10 +72,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
ShowFreeW
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -85,10 +86,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_DID_SAVE_MENU,1
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -100,10 +101,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_ICK_INIT,0
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -115,10 +116,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
WRITE_LAMP,'lamp_fast_hdf_test.hdf', W=1, format='HDF'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -129,10 +130,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
READ_LAMP,'lamp_fast_hdf_test.hdf', W=2
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if long(total(W2)) ne long(W_tot) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
endelse
......@@ -146,10 +147,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
WRITE_LAMP,'lamp_fast_col_test.txt', W=1, format='Column'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & failed_tests = [failed_tests, st] & nbE++ & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -160,10 +161,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
xicute, "W2 = READ_COLUMN('lamp_fast_col_test.txt')"
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if long(total(W2)) ne long(W_tot) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
endelse
......@@ -177,10 +178,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
RDFILTER
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -192,14 +193,14 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ****************************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
W20 = 0
RDFILTER, XRANGE =[2,9], YRANGE=[2,9], ZRANGE=[2,3],$
/XPROJ,/YPROJ,/ZPROJ, SELECT='000003.nxs'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if long(total(W20)) ne long(total(W_test[1:8,1:8])*2.) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
TO_DID_CUR,'W1'
endelse
......@@ -211,10 +212,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
DON_DO_CMD
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -226,10 +227,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
DIALINIT,'xbu'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -240,12 +241,12 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
XBUCONTROL ,'Read' ,FILE=P_to_DATA+'fifi.xbu' ,NAME='xbu'
XBUCONTROL ,'Start' ,NAME='xbu'
DIALTAG, 'xbu' ,TAG ='FREQUENCY',set=.01
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -257,13 +258,13 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
PROX_SHEET, P_to_DATA+'prox_sheet_unitest.prox', /Unitest
if (strpos(!error_state.msg,'INIT_ERROR_STRING') lt 0) then $
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if cell.sn ne W20 then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
TO_DID_CUR,'W1'
endelse
lamp_test_clean, W_managed
......@@ -276,10 +277,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_MAC_EVENT, {ID:0L}, [-88,562,0,0,0 ,-1,-1,0]
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -291,11 +292,11 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
CALIBRATION
CALIBRATION, /LIST
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -307,10 +308,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
macro_files,{ID:0L}, [-88,203,0,0]
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -322,10 +323,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
SAVESESSION
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
file_delete,'lamp.ses', /ALLOW_NON, /QUIET
......@@ -337,10 +338,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_DID_CREATE_BEGOOD, 1, 70, 24, 0, intarr(4,2), lonarr(21)
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -352,10 +353,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
CUSTOMIZ,1
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -367,10 +368,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
PAR_DISP, {ID:0L}
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -382,10 +383,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_DID_JOURNAL, 0L, [-88,396,0,0]
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -397,10 +398,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *****************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
PERIODIC_TABLE
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -412,12 +413,12 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
SEE,w=1, /surface, /beside
SEE,w=1, /image, /LOGBOOK
if strpos(!error_state.msg,'e-LogBook.html') eq -1 then $
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -429,13 +430,13 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *****************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_LAYOUT, 'george'
P_LAYOUT, 'lamp'
P_LAYOUT, 'full'
P_LAYOUT, 'light'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -446,10 +447,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
SUPRPLOT,1
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -461,11 +462,11 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *****************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_BEN_EVENT,{ID:0L}, [-88,402,0]
P_DID_SETWIN0
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -477,11 +478,11 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P_BEN_EVENT,{ID:0L}, [-88,401,0]
P_DID_SETWIN0
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -493,13 +494,13 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *******************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
MAGNET_WIN, P_to_DATA+'XDATCAR', /PLOT
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if (round(total(W19)) ne 744) or $ ;Frames calcul <Cr><Lf>!
((round(total(PV19)) ne 27804) and (round(total(PV19)) ne 27440)) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -511,14 +512,14 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **********************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
RDSET, INST='D16', /RAW, PATH=p_to_data
SET_TOLERANCE, 0.
W = RDOPR('92557+92670', W=19, DATP=rdp)
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if (long(total(W19)/1000.) ne 255) or ((size(W19))[1] ne 502) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -529,15 +530,15 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
Y19 = findgen(320)/319.*31.9 + .05 - 16. ;Y in cm and keep X in 2theta
dst = rdp.p[12] ;Sample distance (cm)
XICUTE, 'W20 = STRAIGHT_2D(W19, DISTANCE='+string(dst)+', /INTEGR)'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if (long(total(W20)/1000.) ne 493) or ((size(W20))[1] ne 969) then $
if (long(total(W20)/1000.) ne 503) or ((size(W20))[1] ne 989) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -548,10 +549,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; **********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
STR_FIT
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -563,12 +564,12 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *****************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
P = STR_FIT(0, Win=1, Bkgd="flat", /pseudo, Fit=f,Res_Dfit=d,Sigma=s,ConvFunc=c, Out_SubF=o)
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if round(total(F)) ne round(W_tot) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -579,14 +580,14 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & cd, mee
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & cd, mee
endif else begin
cd, P_to_DATA
P = STR_FIT(0, Win=1 ,Bkgd="flat",User_model="model_user_last.pro", Fit=f)
cd, mee
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
if round(total(F)) ne round(W_tot) then begin
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & endif
lamp_message,'!Different result' & printf,u,'!Different result' & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
file_delete,P_to_DATA+'str_params.txt', /ALLOW_NON, /QUIET
......@@ -598,10 +599,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; *********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
GFIT
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -613,10 +614,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
QENS_FIT
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -628,10 +629,10 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ******************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
INX
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif
endelse
lamp_test_clean, W_managed
......@@ -643,7 +644,7 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
; ***********************************************
printf,u, '' & printf,u,st & print,'' & print,st & message,/reset
catch,stat
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++
if stat ne 0 then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st]
endif else begin
RDSET, inst='IN6'
READ_LAMP,p_to_data+'sample-Cd6Tb_300k.hdf' , W=2
......@@ -653,9 +654,9 @@ OPENW,u,'lamp_fast_unit_test.txt', /get_lun
'trans_abs=[0.600,0.850,0.000,0.100,0.000,0.000,' + $
'0.000,1.000,0.000,1.000,1.000,0.000,-4.000,1.500,' + $
'300.000,0.000,0.000])'
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & endif
if !error_state.msg gt ' ' then begin & lamp_error & printf,u,!error_state.msg & nbE++ & failed_tests = [failed_tests, st] & endif