Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
subroutine test_equal_diff_variables()type(FileMetadata)::cf1,cf2type(Variable)::v1,v2,v3call cf1%add_dimension('x',10)call cf1%add_dimension('y',20)call cf1%add_dimension('z',30)cf2=cf1v1=Variable(type=pFIO_INT32,dimensions='x')v2=Variable(type=pFIO_REAL64,dimensions='x,y,z')call v3%add_attribute('flag',.true.)call cf1%add_variable('v1',v1)@assertTrue(cf1==cf1)@assertFalse(cf1/=cf1)call cf1%add_variable('v2',v2)@assertFalse(cf1==cf2)@assertFalse(cf2==cf1)call cf2%add_variable('v2',v2)@assertFalse(cf1==cf2)@assertFalse(cf2==cf1)call cf2%add_variable('v1',v1)@assertTrue(cf1==cf2)v3=v1call cf1%add_variable('v3',v3)! Modify v3 before adding to cf2! Deep copy means v3 in cf1 is not affected.call v3%add_attribute('other',[1,2,3])call cf2%add_variable('v3',v3)@assertFalse(cf1==cf2)! get back to v1 call cf2%modify_variable('v3',v1)@assertTrue(cf1==cf2)end subroutine test_equal_diff_variables