1
0

test_template_snippet 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. if $ARGS[0] = 'test_functionname_variant':
  2. $TESTNAME = 'descriptive_testname'
  3. $FUNCTIONNAME = 'functionname'
  4. if _ISVALIDCALL['<<$LOCATIONNAME>>,<<$FUNCTIONNAME>>'] ! 0:
  5. gs 'testframework', 'testsetup'
  6. $EXPECTED = 'expected_value'
  7. $EXPECTED_MESSAGE = "variable_holding_actual_value = <<$EXPECTED>>"
  8. $ARGUMENTS = ''
  9. gs $LOCATIONNAME, $FUNCTIONNAME
  10. *clr & cla
  11. $ACTUAL = variable_holding_actual_value
  12. $ACTUAL_MESSAGE = "variable_holding_actual_value = '<<$ACTUAL>>'"
  13. TESTRESULT = $EXPECTED = $ACTUAL
  14. else
  15. $ACTUAL_MESSAGE = '<<$LOCATIONNAME>> <<$FUNCTIONNAME>> does not exist.'
  16. end
  17. !! ------------------------------------------------------------------------------------
  18. !! Add testresult to the reports.
  19. !! ------------------------------------------------------------------------------------
  20. gs 'testframework', 'addTestResult'
  21. !! ------------------------------------------------------------------------------------
  22. !! Clean up the variables for the next test.
  23. !! ------------------------------------------------------------------------------------
  24. gs 'testframework', 'testCleanUpDefault'
  25. !! add cleanup for any variables that you used for the test. For example, the variable that
  26. !! provided the ACTUAL value or the variables that were set for the tested code.
  27. end