1447
|
1 |
"{ Package: 'stx:goodies/regression' }"
|
302
|
2 |
|
|
3 |
"{ NameSpace: RegressionTests }"
|
|
4 |
|
|
5 |
TestCase subclass:#OS_OLE_Tests
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'OS-Testing'
|
|
10 |
!
|
|
11 |
|
|
12 |
!OS_OLE_Tests class methodsFor:'documentation'!
|
|
13 |
|
|
14 |
documentation
|
|
15 |
"
|
|
16 |
documentation to be added.
|
|
17 |
|
|
18 |
[author:]
|
1447
|
19 |
cg (cg@FUSI)
|
302
|
20 |
|
|
21 |
[instance variables:]
|
|
22 |
|
|
23 |
[class variables:]
|
|
24 |
|
|
25 |
[see also:]
|
|
26 |
|
|
27 |
"
|
|
28 |
! !
|
|
29 |
|
|
30 |
!OS_OLE_Tests methodsFor:'tests'!
|
|
31 |
|
305
|
32 |
test01_loadTypeLib
|
302
|
33 |
"This is a demonstration testCase - it is meant to be removed eventually.
|
|
34 |
This testCase will PASS.
|
|
35 |
Double click on the TestCase class or open a TestRunner to see me checking...
|
|
36 |
- please add more methods like this..."
|
|
37 |
|
|
38 |
|handle|
|
|
39 |
|
1702
|
40 |
self
|
|
41 |
skipIf:OperatingSystem isMSWINDOWSlike not
|
|
42 |
description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
|
1698
|
43 |
|
319
|
44 |
handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
|
304
|
45 |
self assert: ( handle notNil ).
|
319
|
46 |
"/ handle release.
|
304
|
47 |
|
319
|
48 |
handle := OleCom::ITypeLib loadTypeLib:'c:\WINDOWS\system32\Macromed\Flash\swflash.ocx'.
|
302
|
49 |
self assert: ( handle notNil ).
|
319
|
50 |
"/ handle release.
|
302
|
51 |
|
|
52 |
"
|
305
|
53 |
self run:#test01_loadTypeLib
|
|
54 |
self new test01_loadTypeLib
|
|
55 |
"
|
1698
|
56 |
|
1702
|
57 |
"Modified: / 18-09-2017 / 11:54:24 / mawalch"
|
305
|
58 |
!
|
|
59 |
|
|
60 |
test02_getTypeInfoCount
|
|
61 |
"This is a demonstration testCase - it is meant to be removed eventually.
|
|
62 |
This testCase will PASS.
|
|
63 |
Double click on the TestCase class or open a TestRunner to see me checking...
|
|
64 |
- please add more methods like this..."
|
|
65 |
|
|
66 |
|handle numInfo|
|
|
67 |
|
1702
|
68 |
self
|
|
69 |
skipIf:OperatingSystem isMSWINDOWSlike not
|
|
70 |
description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
|
1698
|
71 |
|
319
|
72 |
handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
|
305
|
73 |
self assert: ( handle notNil ).
|
|
74 |
|
|
75 |
numInfo := handle getTypeInfoCount.
|
|
76 |
self assert: ( numInfo > 0 ).
|
|
77 |
|
319
|
78 |
"/ handle release.
|
305
|
79 |
|
|
80 |
"
|
|
81 |
self run:#test02_getTypeInfoCount
|
|
82 |
self new test02_getTypeInfoCount
|
302
|
83 |
"
|
1698
|
84 |
|
1702
|
85 |
"Modified: / 18-09-2017 / 11:54:18 / mawalch"
|
307
|
86 |
!
|
|
87 |
|
|
88 |
test03_coInitialize
|
1698
|
89 |
|
1702
|
90 |
self
|
|
91 |
skipIf:OperatingSystem isMSWINDOWSlike not
|
|
92 |
description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
|
1698
|
93 |
|
1447
|
94 |
OleCom coInitialize.
|
|
95 |
OleCom coUninitialize.
|
307
|
96 |
|
|
97 |
"
|
|
98 |
self run:#test03_coInitialize
|
|
99 |
self new test03_coInitialize
|
|
100 |
"
|
1698
|
101 |
|
1702
|
102 |
"Modified: / 18-09-2017 / 11:54:09 / mawalch"
|
302
|
103 |
! !
|
|
104 |
|
|
105 |
!OS_OLE_Tests class methodsFor:'documentation'!
|
|
106 |
|
|
107 |
version
|
|
108 |
^ '$Header$'
|
|
109 |
! !
|
1698
|
110 |
|