shtk_unittest_add_fixture man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

SHTK_UNITTEST_ADD_FIX... BSD Library Functions Manual SHTK_UNITTEST_ADD_FIX...

NAME
     shtk_unittest_add_fixture — Defines a test fixture

LIBRARY
     shtk_import unittest

SYNOPSIS
     shtk_unittest_add_fixture name

DESCRIPTION
     The shtk_unittest_add_fixture function registers the fixture given by
     name.  A function named ‘<name>_fixture’ must be defined after the call
     to shtk_unittest_add_fixture has been made.

     Fixture functions must not directly contain any code.  All they can do is
     define other functions, such as setup and teardown, and execute calls to
     shtk_unittest_add_test(3).

EXAMPLES
     The following piece of code illustrates the components of a test fixture:

	   shtk_unittest_add_fixture my_collection
	   my_collection_fixture() {
	       setup() {
		   ... optional function providing per-test setup code ...
	       }

	       teardown() {
		   ... optional function providing per-test teardown code ...
	       }

	       shtk_unittest_add_test first_scenario
	       first_scenario_test() {
		   ... test code for the first test case ...
	       }

	       shtk_unittest_add_test second_scenario
	       second_scenario_test() {
		   ... test code for the second test case ...
	       }
	   }

SEE ALSO
     shtk(3), shtk_unittest(3)

HISTORY
     shtk_unittest_add_fixture first appeared in shtk 1.6.

BSD			       November 8, 2014				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net