FURY test of uom.
| Type | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|
| type(uom64) | :: | si_mass | SI mass unit. |
|||
| type(uom64) | :: | a_unit | A unit. |
|||
| logical | :: | test_passed(1) | List of passed tests. |
program fury_test_uom_sub
!-----------------------------------------------------------------------------------------------------------------------------------
!< FURY test of [[uom]].
!-----------------------------------------------------------------------------------------------------------------------------------
use fury
!-----------------------------------------------------------------------------------------------------------------------------------
!-----------------------------------------------------------------------------------------------------------------------------------
type(uom64) :: si_mass !< SI mass unit.
type(uom64) :: a_unit !< A unit.
logical :: test_passed(1) !< List of passed tests.
!-----------------------------------------------------------------------------------------------------------------------------------
!-----------------------------------------------------------------------------------------------------------------------------------
test_passed = .false.
si_mass = uom64(source='kg [mass]', name='kilogram')
a_unit = si_mass - si_mass
test_passed(1) = a_unit == si_mass
print "(A,L1)", 'si_mass - si_mass = '//a_unit%stringify(with_dimensions=.true.)//', is correct? ', test_passed(1)
print "(A)", 'si_mass - si_mass name is: '//a_unit%name
print "(A,L1)", new_line('a')//'Are all tests passed? ', all(test_passed)
stop
!-----------------------------------------------------------------------------------------------------------------------------------
endprogram fury_test_uom_sub