Closed rcolomina closed 6 years ago
Procedure compare_struct.pro cannot does not work if any member of the target structures has as member a hash.
TEST PROCEDURE
print," " print, "Test Case : Comparing structures with hashes on it" s1 = {x:1,h1:hash("x",1,"y",2)} s2 = {x:1,h1:hash("x",1,"y",2)} print,"s1:",s1 print,"s2:",s2 compare_struct(s1,s21)
OUTPUT
% Compiled module: COMPARE_STRUCT. { "TAG_NUM_A": 1, "TAG_NUM_B": 1, "FIELD": ".H1", "NDIFF": 1 }
I committed a fix today which uses the fact that if s1 and s2 are identical hashes then s1 NE s2 returns an empty list. Not well tested
Procedure compare_struct.pro cannot does not work if any member of the target structures has as member a hash.
TEST PROCEDURE
print," " print, "Test Case : Comparing structures with hashes on it" s1 = {x:1,h1:hash("x",1,"y",2)} s2 = {x:1,h1:hash("x",1,"y",2)} print,"s1:",s1 print,"s2:",s2 compare_struct(s1,s21)
OUTPUT
% Compiled module: COMPARE_STRUCT. { "TAG_NUM_A": 1, "TAG_NUM_B": 1, "FIELD": ".H1", "NDIFF": 1 }