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 |
|
1698
|
40 |
"/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
|
|
41 |
OperatingSystem isMSWINDOWSlike ifFalse:[
|
|
42 |
self skip.
|
|
43 |
].
|
|
44 |
|
319
|
45 |
handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
|
304
|
46 |
self assert: ( handle notNil ).
|
319
|
47 |
"/ handle release.
|
304
|
48 |
|
319
|
49 |
handle := OleCom::ITypeLib loadTypeLib:'c:\WINDOWS\system32\Macromed\Flash\swflash.ocx'.
|
302
|
50 |
self assert: ( handle notNil ).
|
319
|
51 |
"/ handle release.
|
302
|
52 |
|
|
53 |
"
|
305
|
54 |
self run:#test01_loadTypeLib
|
|
55 |
self new test01_loadTypeLib
|
|
56 |
"
|
1698
|
57 |
|
|
58 |
"Modified: / 13-09-2017 / 10:37:48 / mawalch"
|
305
|
59 |
!
|
|
60 |
|
|
61 |
test02_getTypeInfoCount
|
|
62 |
"This is a demonstration testCase - it is meant to be removed eventually.
|
|
63 |
This testCase will PASS.
|
|
64 |
Double click on the TestCase class or open a TestRunner to see me checking...
|
|
65 |
- please add more methods like this..."
|
|
66 |
|
|
67 |
|handle numInfo|
|
|
68 |
|
1698
|
69 |
"/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
|
|
70 |
OperatingSystem isMSWINDOWSlike ifFalse:[
|
|
71 |
self skip.
|
|
72 |
].
|
|
73 |
|
319
|
74 |
handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
|
305
|
75 |
self assert: ( handle notNil ).
|
|
76 |
|
|
77 |
numInfo := handle getTypeInfoCount.
|
|
78 |
self assert: ( numInfo > 0 ).
|
|
79 |
|
319
|
80 |
"/ handle release.
|
305
|
81 |
|
|
82 |
"
|
|
83 |
self run:#test02_getTypeInfoCount
|
|
84 |
self new test02_getTypeInfoCount
|
302
|
85 |
"
|
1698
|
86 |
|
|
87 |
"Modified: / 13-09-2017 / 10:38:18 / mawalch"
|
307
|
88 |
!
|
|
89 |
|
|
90 |
test03_coInitialize
|
1698
|
91 |
|
|
92 |
"/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
|
|
93 |
OperatingSystem isMSWINDOWSlike ifFalse:[
|
|
94 |
self skip.
|
|
95 |
].
|
|
96 |
|
1447
|
97 |
OleCom coInitialize.
|
|
98 |
OleCom coUninitialize.
|
307
|
99 |
|
|
100 |
"
|
|
101 |
self run:#test03_coInitialize
|
|
102 |
self new test03_coInitialize
|
|
103 |
"
|
1698
|
104 |
|
|
105 |
"Modified: / 13-09-2017 / 10:38:29 / mawalch"
|
302
|
106 |
! !
|
|
107 |
|
|
108 |
!OS_OLE_Tests class methodsFor:'documentation'!
|
|
109 |
|
|
110 |
version
|
|
111 |
^ '$Header$'
|
|
112 |
! !
|
1698
|
113 |
|