codesnippets:testingconventions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| codesnippets:testingconventions [2022/04/07 12:42] – f2b216 | codesnippets:testingconventions [2025/10/08 00:48] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Testing conventions ====== | ====== Testing conventions ====== | ||
| - | ~~DISCUSSION~~ | ||
| ===== Setup with stack ===== | ===== Setup with stack ===== | ||
| Line 109: | Line 108: | ||
| === HUnit test === | === HUnit test === | ||
| - | | + | |
| - | - 1st parameter :: [Char]/ | + | - parameter :: [Char]/ |
| - | | + | |
| - | - 2nd parameter :: Assertation: | + | - parameter :: Assertation: |
| - | | + | |
| * example '' | * example '' | ||
| Line 132: | Line 131: | ||
| === QuickCheck test === | === QuickCheck test === | ||
| + | |||
| + | * Function: HUnit.testProperty | ||
| + | - parameter :: [Char]/ | ||
| + | * e.g. "Type 1 #p1", "Type 1 #p2", ... "Type 1 #p42" | ||
| + | - parameter :: a: Two functions from a lambda parameter left and rigth from " | ||
| + | * e.g. 3 * 2 @?= 2 * 3 | ||
| * example '' | * example '' | ||
| Line 292: | Line 297: | ||
| * the complete set of possible test values/data is used in unit tests, | * the complete set of possible test values/data is used in unit tests, | ||
| * or values for all possible equivalence classes are used | * or values for all possible equivalence classes are used | ||
| - | * or ramdom | + | * or random |
| * independence: | * independence: | ||
| - | * test method is independent | + | * test methods are independent functions |
| - | * or dependent | + | * unless they depend |
| - | * boundaries: | + | * edge cases: |
| - | * corner | + | * edge cases are tested by unit tests (HUnit) |
| * conform doc.: | * conform doc.: | ||
| * all tests are conform to documentation, | * all tests are conform to documentation, | ||
| - | After checking the abovementioned | + | After checking the above mentioned |
| * < | * < | ||
| - | {- | + | {- * validated: ✅ |
| - | | + | |
| * completeness: | * completeness: | ||
| * independence: | * independence: | ||
| - | * boundaries | + | * edge cases : ✅ |
| * conform doc.: ✅ -} | * conform doc.: ✅ -} | ||
| tgUnitf1 :: T.TestTree | tgUnitf1 :: T.TestTree | ||
| Line 341: | Line 345: | ||
| After checking the abovementioned criteria, the result is documented as source code comment: | After checking the abovementioned criteria, the result is documented as source code comment: | ||
| * < | * < | ||
| - | {- | + | {- * validated: ✅ |
| - | | + | |
| * documented: ✅ | * documented: ✅ | ||
| * laws : ✅ | * laws : ✅ | ||
| Line 376: | Line 379: | ||
| Description : provides a class for ... | Description : provides a class for ... | ||
| Copyright | Copyright | ||
| - | License | + | License |
| Maintainer | Maintainer | ||
| Stability | Stability | ||
| Line 389: | Line 392: | ||
| * example: < | * example: < | ||
| - | {- module A | + | {- * validated: ✅ |
| - | | + | |
| * documented: ✅ | * documented: ✅ | ||
| * completeness: | * completeness: | ||
| Line 405: | Line 407: | ||
| </ | </ | ||
| + | |||
| + | ===== ✎ ===== | ||
| + | ~~DISCUSSION~~ | ||
codesnippets/testingconventions.1649328156.txt.gz · Last modified: (external edit)
