26 ! |
26 ! |
27 |
27 |
28 Stdout showCR:'Selftest Started'. |
28 Stdout showCR:'Selftest Started'. |
29 ! |
29 ! |
30 |
30 |
|
31 Smalltalk packagePath addFirst:'../../../..'. |
31 Stdout showCR:'Loading sunit...'. |
32 Stdout showCR:'Loading sunit...'. |
32 Smalltalk loadPackage:'stx:goodies/sunit'. |
33 Smalltalk loadPackage:'stx:goodies/sunit'. |
33 self assert:(TestCase notNil and:[TestCase isLoaded]) message:'[Error]: Missing TestCase class after sunit package load'. |
34 self assert:(TestCase notNil and:[TestCase isLoaded]) message:'[Error]: Missing TestCase class after sunit package load'. |
34 |
35 |
35 "/ Smalltalk loadPackage:'stx:goodies/xml/vw'. |
36 "/ Smalltalk loadPackage:'stx:goodies/xml/vw'. |
44 suite := TestSuite named:'SelfTest'. |
45 suite := TestSuite named:'SelfTest'. |
45 |
46 |
46 Stdout showCR:'Loading regression tests...'. |
47 Stdout showCR:'Loading regression tests...'. |
47 |
48 |
48 "To add a new test please edit exept_regression>>testCaseNamesWithoutNamespace" |
49 "To add a new test please edit exept_regression>>testCaseNamesWithoutNamespace" |
49 Smalltalk packagePath addFirst:'../../../..'. |
|
50 Smalltalk fileInClass:#'exept_regression' package:'exept:regression'. |
50 Smalltalk fileInClass:#'exept_regression' package:'exept:regression'. |
51 (Smalltalk at: #'exept_regression') isNil ifTrue:[ |
51 (Smalltalk at: #'exept_regression') isNil ifTrue:[ |
52 Stdout showCR:('ERROR: Ouch - missing class: "exept_regression"'). |
52 Stdout showCR:('ERROR: Ouch - missing class: "exept_regression"'). |
53 Smalltalk exit: 1. |
53 Smalltalk exit: 1. |
54 ]. |
54 ]. |
|
55 exept_regression ensureFullyLoaded. |
|
56 |
55 (Smalltalk at: #'exept_regression') testCaseNamesWithoutNamespace do:[:className | |
57 (Smalltalk at: #'exept_regression') testCaseNamesWithoutNamespace do:[:className | |
56 |fullName| |
58 |fullName| |
57 |
59 |
58 fullName := ('RegressionTests::',className). |
60 fullName := ('RegressionTests::',className). |
59 Stdout showCR:('Loading ',className,'...'). |
61 Stdout showCR:(' loading ',className,'...'). |
60 Smalltalk fileInClass:fullName package:'exept:regression'. |
62 Error handle:[:ex | |
|
63 Stdout showCR:('**** Ouch - error while loading class: "',className,'"'). |
|
64 ] do:[ |
|
65 Smalltalk fileInClass:fullName package:'exept:regression'. |
|
66 ]. |
61 (Smalltalk classNamed:fullName) isNil ifTrue:[ |
67 (Smalltalk classNamed:fullName) isNil ifTrue:[ |
62 Stdout showCR:('**** Ouch - missing class: "',fullName,'"'). |
68 Stdout showCR:('**** Ouch - missing class: "',fullName,'"'). |
63 ] ifFalse:[ |
69 ] ifFalse:[ |
64 suite addTest:(Smalltalk classNamed:fullName) suite. |
70 suite addTest:(Smalltalk classNamed:fullName) suite. |
65 ] |
71 ] |