author | Claus Gittinger <cg@exept.de> |
Sun, 01 Jul 2018 12:52:19 +0200 | |
changeset 719 | 2c96860ad5cb |
parent 222 | 8e6f482297fa |
child 611 | 1eecc860f4a5 |
child 664 | e31b2e7b658d |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
3 |
SUnitTest subclass:#TestSuitesScriptTest |
|
4 |
instanceVariableNames:'scripter suite' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
7 |
category:'SUnit-Tests' |
0 | 8 |
! |
9 |
||
14 | 10 |
|
68 | 11 |
!TestSuitesScriptTest methodsFor:'running'! |
0 | 12 |
|
13 |
setUp |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
14 |
scripter := TestSuitesScripter new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
15 |
! ! |
0 | 16 |
|
68 | 17 |
!TestSuitesScriptTest methodsFor:'testing'! |
0 | 18 |
|
19 |
testCompoundScript |
|
222 | 20 |
| allTestCaseClasses superCase subCase | |
21 |
allTestCaseClasses := (scripter run: 'TestSuitesHierarchyScriptTest TestSuitesCompoundScriptTest') tests. |
|
22 |
self assert: allTestCaseClasses size = 2. |
|
23 |
superCase := (allTestCaseClasses at: 1) tests first. |
|
24 |
self assert: superCase class name asSymbol == #TestSuitesHierarchyScriptTest. |
|
25 |
subCase := (allTestCaseClasses at: 2) tests first. |
|
26 |
self assert: subCase class name asSymbol == #TestSuitesCompoundScriptTest. |
|
0 | 27 |
|
28 |
"Modified: / 21.6.2000 / 10:26:48 / Sames" |
|
29 |
! |
|
30 |
||
31 |
testEmbeddedNameCommentScript |
|
32 |
suite := scripter run: ' "This comment contains the name of a SUnitTest Case" TestSuitesScriptTest'. |
|
33 |
self assert: suite tests size = 1 |
|
34 |
||
35 |
"Modified: / 21.6.2000 / 10:27:02 / Sames" |
|
36 |
! |
|
37 |
||
38 |
testEmptyCommentScript |
|
39 |
suite := scripter run: ' " " TestSuitesScriptTest'. |
|
40 |
self assert: suite tests size = 1 |
|
41 |
||
42 |
"Modified: / 21.6.2000 / 10:27:14 / Sames" |
|
43 |
! |
|
44 |
||
45 |
testEmptyHierachyScript |
|
46 |
suite := scripter run: '*'. |
|
47 |
self assert: suite tests isEmpty |
|
48 |
||
49 |
"Modified: / 21.6.2000 / 10:27:24 / Sames" |
|
50 |
! |
|
51 |
||
52 |
testEmptyScript |
|
53 |
suite := scripter run: ''. |
|
54 |
self assert: suite tests isEmpty |
|
55 |
||
56 |
"Modified: / 21.6.2000 / 10:27:39 / Sames" |
|
57 |
! |
|
58 |
||
59 |
testHierachyScript |
|
222 | 60 |
| allTestCaseClasses superCase subCase | |
61 |
suite := scripter run: 'TestSuitesHierarchyScriptTest*'. |
|
62 |
allTestCaseClasses := suite tests. |
|
63 |
self assert: allTestCaseClasses size = 1. |
|
64 |
superCase := (allTestCaseClasses first tests at: 1) tests first. |
|
65 |
self assert: superCase class name asSymbol = #TestSuitesHierarchyScriptTest. |
|
66 |
subCase := (allTestCaseClasses first tests at: 2) tests first. |
|
67 |
self assert: subCase class name asSymbol = #TestSuitesCompoundScriptTest. |
|
0 | 68 |
|
69 |
"Modified: / 21.6.2000 / 10:28:02 / Sames" |
|
70 |
! |
|
71 |
||
72 |
testOpenCommentScript |
|
73 |
suite := scripter run: ' "SUnitTest'. |
|
74 |
self assert: suite tests isEmpty |
|
75 |
||
76 |
"Modified: / 21.6.2000 / 10:28:18 / Sames" |
|
77 |
! |
|
78 |
||
79 |
testSimpleScript |
|
222 | 80 |
| allTestCaseClasses case | |
81 |
suite := scripter run: 'TestSuitesHierarchyScriptTest'. |
|
82 |
allTestCaseClasses := suite tests. |
|
83 |
self assert: allTestCaseClasses size = 1. |
|
84 |
case := (allTestCaseClasses at: 1) tests at: 1. |
|
85 |
self assert: case class name asSymbol = #TestSuitesHierarchyScriptTest. |
|
0 | 86 |
|
87 |
"Modified: / 21.6.2000 / 10:28:35 / Sames" |
|
88 |
! |
|
89 |
||
90 |
testSingleWordCommentScript |
|
91 |
suite := scripter run: ' "SUnitTest" TestSuitesScriptTest'. |
|
92 |
self assert: suite tests size = 1 |
|
93 |
||
94 |
"Modified: / 21.6.2000 / 10:28:47 / Sames" |
|
95 |
! |
|
96 |
||
97 |
testTwoCommentsScript |
|
98 |
suite := scripter run: ' " SUnitTest " " SUnitTest " TestSuitesScriptTest'. |
|
99 |
self assert: suite tests size = 1 |
|
100 |
||
101 |
"Modified: / 21.6.2000 / 10:28:59 / Sames" |
|
102 |
! ! |
|
103 |
||
14 | 104 |
!TestSuitesScriptTest class methodsFor:'documentation'! |
105 |
||
106 |
version |
|
222 | 107 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuitesScriptTest.st,v 1.6 2011-06-29 19:15:49 cg Exp $' |
108 |
! |
|
109 |
||
110 |
version_SVN |
|
111 |
^ '§Id: TestSuitesScriptTest.st 182 2009-12-05 18:12:17Z vranyj1 §' |
|
14 | 112 |
! ! |