anchor.diff:      ?CHECK([], nif_mod_call_history()),    % no dtor
   
       ok = forget_resource(BGX2),  % calling dtor in orphan library v1 still loaded
  -    ?CHECK([{{resource_dtor_B_v1,BinBGX2},1,6,106}], nif_mod_call_history()),
  -    % How to test that lib v1 is closed here?
  +    ?CHECK([{{resource_dtor_B_v1,BinBGX2},1,6,106}, {unload,1,7,107}],
  +           nif_mod_call_history()),
   
       ok = forget_resource(NGX2),
       ?CHECK([], nif_mod_call_history()),  % no dtor
  
positive.code: -module(nif_SUITE).
  
  %%-define(line_trace,true).
  -define(CHECK(Exp,Got), check(Exp,Got,?LINE)).
  %%-define(CHECK(Exp,Got), Exp = Got).
  
  -include_lib("common_test/include/ct.hrl").
  
negative.code:                               ]),
      ?CHECK([{upgrade,2,1,201}], nif_mod_call_history()),
      true = erlang:purge_module(nif_mod),
      ?CHECK([], nif_mod_call_history()),  % BGX2 keeping lib loaded
  
      BinA2 = read_resource(0,A2),
      ok = forget_resource(A2),
  