author | Patrik Svestka <patrik.svestka@gmail.com> |
Wed, 14 Nov 2018 13:11:58 +0100 | |
branch | jv |
changeset 724 | 4dae63fce9f9 |
parent 664 | e31b2e7b658d |
permissions | -rw-r--r-- |
724
4dae63fce9f9
vIssue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
4dae63fce9f9
vIssue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
2 |
|
0 | 3 |
"{ Package: 'stx:goodies/sunit' }" |
4 |
||
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
5 |
"{ NameSpace: Smalltalk }" |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
6 |
|
0 | 7 |
SUnitTest subclass:#TestSuitesScriptTest |
8 |
instanceVariableNames:'scripter suite' |
|
9 |
classVariableNames:'' |
|
10 |
poolDictionaries:'' |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
11 |
category:'SUnit-Tests' |
0 | 12 |
! |
13 |
||
14 | 14 |
|
68 | 15 |
!TestSuitesScriptTest methodsFor:'running'! |
0 | 16 |
|
17 |
setUp |
|
6
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
18 |
scripter := TestSuitesScripter new. |
78bb1397e43d
added rerun-defect tests; fixed button enable bug
Claus Gittinger <cg@exept.de>
parents:
0
diff
changeset
|
19 |
! ! |
0 | 20 |
|
68 | 21 |
!TestSuitesScriptTest methodsFor:'testing'! |
0 | 22 |
|
23 |
testCompoundScript |
|
222 | 24 |
| allTestCaseClasses superCase subCase | |
25 |
allTestCaseClasses := (scripter run: 'TestSuitesHierarchyScriptTest TestSuitesCompoundScriptTest') tests. |
|
26 |
self assert: allTestCaseClasses size = 2. |
|
27 |
superCase := (allTestCaseClasses at: 1) tests first. |
|
28 |
self assert: superCase class name asSymbol == #TestSuitesHierarchyScriptTest. |
|
29 |
subCase := (allTestCaseClasses at: 2) tests first. |
|
30 |
self assert: subCase class name asSymbol == #TestSuitesCompoundScriptTest. |
|
0 | 31 |
|
32 |
"Modified: / 21.6.2000 / 10:26:48 / Sames" |
|
33 |
! |
|
34 |
||
35 |
testEmbeddedNameCommentScript |
|
36 |
suite := scripter run: ' "This comment contains the name of a SUnitTest Case" TestSuitesScriptTest'. |
|
37 |
self assert: suite tests size = 1 |
|
38 |
||
39 |
"Modified: / 21.6.2000 / 10:27:02 / Sames" |
|
40 |
! |
|
41 |
||
42 |
testEmptyCommentScript |
|
43 |
suite := scripter run: ' " " TestSuitesScriptTest'. |
|
44 |
self assert: suite tests size = 1 |
|
45 |
||
46 |
"Modified: / 21.6.2000 / 10:27:14 / Sames" |
|
47 |
! |
|
48 |
||
49 |
testEmptyHierachyScript |
|
50 |
suite := scripter run: '*'. |
|
51 |
self assert: suite tests isEmpty |
|
52 |
||
53 |
"Modified: / 21.6.2000 / 10:27:24 / Sames" |
|
54 |
! |
|
55 |
||
56 |
testEmptyScript |
|
57 |
suite := scripter run: ''. |
|
58 |
self assert: suite tests isEmpty |
|
59 |
||
60 |
"Modified: / 21.6.2000 / 10:27:39 / Sames" |
|
61 |
! |
|
62 |
||
63 |
testHierachyScript |
|
222 | 64 |
| allTestCaseClasses superCase subCase | |
65 |
suite := scripter run: 'TestSuitesHierarchyScriptTest*'. |
|
66 |
allTestCaseClasses := suite tests. |
|
67 |
self assert: allTestCaseClasses size = 1. |
|
68 |
superCase := (allTestCaseClasses first tests at: 1) tests first. |
|
69 |
self assert: superCase class name asSymbol = #TestSuitesHierarchyScriptTest. |
|
70 |
subCase := (allTestCaseClasses first tests at: 2) tests first. |
|
71 |
self assert: subCase class name asSymbol = #TestSuitesCompoundScriptTest. |
|
0 | 72 |
|
73 |
"Modified: / 21.6.2000 / 10:28:02 / Sames" |
|
74 |
! |
|
75 |
||
76 |
testOpenCommentScript |
|
77 |
suite := scripter run: ' "SUnitTest'. |
|
78 |
self assert: suite tests isEmpty |
|
79 |
||
80 |
"Modified: / 21.6.2000 / 10:28:18 / Sames" |
|
81 |
! |
|
82 |
||
83 |
testSimpleScript |
|
222 | 84 |
| allTestCaseClasses case | |
85 |
suite := scripter run: 'TestSuitesHierarchyScriptTest'. |
|
86 |
allTestCaseClasses := suite tests. |
|
87 |
self assert: allTestCaseClasses size = 1. |
|
88 |
case := (allTestCaseClasses at: 1) tests at: 1. |
|
89 |
self assert: case class name asSymbol = #TestSuitesHierarchyScriptTest. |
|
0 | 90 |
|
91 |
"Modified: / 21.6.2000 / 10:28:35 / Sames" |
|
92 |
! |
|
93 |
||
94 |
testSingleWordCommentScript |
|
95 |
suite := scripter run: ' "SUnitTest" TestSuitesScriptTest'. |
|
96 |
self assert: suite tests size = 1 |
|
97 |
||
98 |
"Modified: / 21.6.2000 / 10:28:47 / Sames" |
|
99 |
! |
|
100 |
||
101 |
testTwoCommentsScript |
|
102 |
suite := scripter run: ' " SUnitTest " " SUnitTest " TestSuitesScriptTest'. |
|
103 |
self assert: suite tests size = 1 |
|
104 |
||
105 |
"Modified: / 21.6.2000 / 10:28:59 / Sames" |
|
106 |
! ! |
|
107 |
||
14 | 108 |
!TestSuitesScriptTest class methodsFor:'documentation'! |
109 |
||
110 |
version |
|
222 | 111 |
^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuitesScriptTest.st,v 1.6 2011-06-29 19:15:49 cg Exp $' |
112 |
! |
|
113 |
||
114 |
version_SVN |
|
724
4dae63fce9f9
vIssue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present
Patrik Svestka <patrik.svestka@gmail.com>
parents:
664
diff
changeset
|
115 |
^ '§Id: TestSuitesScriptTest.st 182 2009-12-05 18:12:17Z vranyj1 §' |
14 | 116 |
! ! |
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
117 |