Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SHTK_UNITTEST_MAIN(3)	    Library Functions Manual	 SHTK_UNITTEST_MAIN(3)

NAME
       shtk_unittest_main -- Standard test program entry point

LIBRARY
       shtk_import unittest

SYNOPSIS
       shtk_unittest_main

DESCRIPTION
       The  shtk_unittest_main function	implements the standard	entry point of
       a  test	program	 that  uses   the   shtk_unittest(3)   library.	   The
       shtk_unittest_main  function  runs all test cases registered within the
       test case and determines	the correct exit condition for the  test  pro-
       gram.

       In  order  to use shtk_unittest_main, test programs must	either explic-
       itly call the function from their main method as	this:

	     main() { shtk_unittest_main "${@}"; }

       Or the test program can be compiled  with  an  override	for  the  main
       method's	name:

	     $ shtk build -m shtk_unittest_main	module_test.sh

       In general, prefer the latter mechanism.

RETURN VALUES
       Returns	0  (true) if all executed test cases pass, or 1	(false)	if any
       test fails.

SEE ALSO
       shtk(3),	shtk_unittest(3)

HISTORY
       shtk_unittest_main first	appeared in shtk 1.6.

FreeBSD	Ports 14.quarterly     November	8, 2014		 SHTK_UNITTEST_MAIN(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=shtk_unittest_main&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help