mom_unit_testing module reference¶
<undocumented>
Data Types¶
UnitTest node of TestSuite’s linked list. |
Functions/Subroutines¶
Return a new unit test without a cleanup function. |
|
Return a new unit test with an explicit cleanup function. |
|
Launch a unit test with a custom cleanup procedure. |
|
Return a new test suite. |
|
Initialize string with a character array. |
|
Convert an integer to a string. |
|
Create a text file for unit testing. |
|
Delete a file created during testing. |
Detailed Description¶
<undocumented>
Type Documentation¶
-
type
mom_unit_testing/
unittestnode
¶ UnitTest node of TestSuite’s linked list.
- Type fields:
%
test
[type( unittest ),pointer, private] :: Node contents.%
next
[type( unittestnode ),pointer, private] :: Pointer to next node in list.
Function/Subroutine Documentation¶
-
function
mom_unit_testing/
create_unit_test_basic
(proc, name, fatal) [type(unittest)]¶ Return a new unit test without a cleanup function.
- Parameters:
proc :: Subroutine which defines the unit test
name :: [in] Name of the unit test
fatal :: [in] True if the test is expected to raise a FATAL error
- Called from:
mom_unit_testing::unittest::run
-
function
mom_unit_testing/
create_unit_test_full
(proc, name, fatal, cleanup) [type(unittest)]¶ Return a new unit test with an explicit cleanup function.
- Parameters:
proc :: Subroutine which defines the unit test
name :: [in] Name of the unit test
fatal :: True if the test is expected to raise a FATAL error
cleanup :: Cleanup subroutine, called after test
- Called from:
mom_unit_testing::unittest::create_unit_test_basic
mom_unit_testing::unittest::run
-
subroutine
mom_unit_testing/
run_unit_test
(test)¶ Launch a unit test with a custom cleanup procedure.
-
function
mom_unit_testing/
create_test_suite
() [type(testsuite)]¶ Return a new test suite.
- Called from:
mom_unit_testing::testsuite::run
-
subroutine
mom_unit_testing/
add_unit_test_basic
(suite, test, name, fatal)¶ - Call to:
-
subroutine
mom_unit_testing/
add_unit_test_full
(suite, test, name, fatal, cleanup)¶ - Called from:
-
subroutine
mom_unit_testing/
run_test_suite
(suite)¶
-
function
mom_unit_testing/
init_string_char
(c) [type(string)]¶ Initialize string with a character array.
- Parameters:
c :: [in] List of character arrays
- Return:
undefined :: String output
-
function
mom_unit_testing/
init_string_int
(n) [type(string)]¶ Convert an integer to a string.
- Parameters:
n :: [in] Integer input
- Return:
undefined :: String output
-
subroutine
mom_unit_testing/
create_test_file
(filename, lines, mode)¶ Create a text file for unit testing.
- Parameters:
filename :: [in] Name of file to be created
lines :: [in] list of strings to write to file
mode :: [in] Permissions of new file
-
subroutine
mom_unit_testing/
delete_test_file
(filename)¶ Delete a file created during testing.
- Parameters:
filename :: [in] Name of file to be deleted
- Called from:
mom_file_parser_tests::cleanup_file_parser
mom_file_parser_tests::cleanup_open_param_file_component
mom_file_parser_tests::cleanup_open_param_file_netcdf