aboutsummaryrefslogtreecommitdiff
path: root/test/shunit2-2.0.3/doc/design_doc.txt
diff options
context:
space:
mode:
authorPeter Carbonetto2017-07-18 13:56:10 -0500
committerPeter Carbonetto2017-07-18 13:56:10 -0500
commit42dc643e44563f64d3b7593c051898b7879d9878 (patch)
tree33fcd6aa1066016aea9b54e97a84f4250562c007 /test/shunit2-2.0.3/doc/design_doc.txt
parent8de8f701755b3dc4c042591541aa86bfda02f36b (diff)
downloadpangemma-42dc643e44563f64d3b7593c051898b7879d9878.tar.gz
Moved shunit2 files to test directory.
Diffstat (limited to 'test/shunit2-2.0.3/doc/design_doc.txt')
-rw-r--r--test/shunit2-2.0.3/doc/design_doc.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/shunit2-2.0.3/doc/design_doc.txt b/test/shunit2-2.0.3/doc/design_doc.txt
new file mode 100644
index 0000000..2849e55
--- /dev/null
+++ b/test/shunit2-2.0.3/doc/design_doc.txt
@@ -0,0 +1,54 @@
+Design Doc for shUnit2
+======================
+
+shUnit is based upon JUnit. The initial ideas for the script came from the book
+"Pragmatic Unit Testing - In Java with JUnit" by Andrew Hunt and David Thomas.
+
+The script was written to perform unit testing for log4sh. log4sh had grown
+enough that it was becoming difficult to easily test and and verify that the
+tests passed for the many different operating systems on which it was being
+used.
+
+The functions in shUnit are meant to match those in JUnit as much as possible
+where shell allows. In the initial version, there will be no concept of
+exceptions (as normal POSIX shell has no concept of them) but attempts to trap
+problems will be done.
+
+Programatic Standards
+---------------------
+
+* SHUNIT_TRUE - public global constant
+* __SHUNIT_SHELL_FLAGS - private global constant
+* __shunit_oldShellFlags - private global variable
+
+* assertEquals - public unit test function
+* shunit_publicFunc - public shUnit function; can be called from parent unit
+ test script
+* _shunit_privateFunc - private shUnit function; should not be called from
+ parent script. meant for internal use by shUnit
+
+* _su_myVar - variable inside a public function. prefixing with '_su_' to
+ reduce the chances that a variable outside of shUnit will be overridden.
+* _su__myVar - variable inside a private function. prefixing with '_su__' to
+ reduce the chances that a variable in a shUnit public function, or a variable
+ outside of shUnit will be overridden.
+
+List of functions
+-----------------
+
+assertTrue([message,] boolean)
+assertFalse([message,] boolean)
+fail([message])
+assertEquals([message,] expected, actual)
+#isEquals(expected, actual)
+#assertArrayEquals([message,] expecteds, actuals)
+#isArray(expected)
+assertNotNull([message,] object)
+assertNull([message,], object)
+assertSame([message,], expected, actual)
+assertNotSame([message,], unexpected, actual)
+failSame(message)
+failNotSame([message,] expected, actual)
+
+.. $Revision$
+.. vim:syntax=rst