RegressionTests__OS_OLE_Tests.st
author convert-repo
Thu, 08 Dec 2016 04:53:03 +0000
changeset 1563 bcbe9f1e2bba
parent 1447 2351db93aa5b
child 1500 d406a10b2965
child 1698 4dfaff79690e
permissions -rw-r--r--
update tags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 319
diff changeset
     1
"{ Package: 'stx:goodies/regression' }"
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
TestCase subclass:#OS_OLE_Tests
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:''
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	classVariableNames:''
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	poolDictionaries:''
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	category:'OS-Testing'
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
!
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!OS_OLE_Tests class methodsFor:'documentation'!
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
documentation
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
"
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
    documentation to be added.
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    [author:]
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 319
diff changeset
    19
	cg (cg@FUSI)
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
    [instance variables:]
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    [class variables:]
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    [see also:]
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
"
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
! !
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
!OS_OLE_Tests methodsFor:'tests'!
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
305
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    32
test01_loadTypeLib
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
    "This is a demonstration testCase - it is meant to be removed eventually.
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
     This testCase will PASS.
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
     Double click on the TestCase class or open a TestRunner to see me checking...
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
     - please add more methods like this..."
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
    |handle|
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    40
    handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
304
35d41f29f588 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
    41
    self assert: ( handle notNil ).
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    42
    "/ handle release.
304
35d41f29f588 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 303
diff changeset
    43
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    44
    handle := OleCom::ITypeLib loadTypeLib:'c:\WINDOWS\system32\Macromed\Flash\swflash.ocx'.
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    self assert: ( handle notNil ).
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    46
    "/ handle release.
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    "
305
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    49
     self run:#test01_loadTypeLib
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    50
     self new test01_loadTypeLib
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    51
    "
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    52
!
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    53
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    54
test02_getTypeInfoCount
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    55
    "This is a demonstration testCase - it is meant to be removed eventually.
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    56
     This testCase will PASS.
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    57
     Double click on the TestCase class or open a TestRunner to see me checking...
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    58
     - please add more methods like this..."
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    59
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    60
    |handle numInfo|
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    61
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    62
    handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
305
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    63
    self assert: ( handle notNil ).
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    64
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    65
    numInfo := handle getTypeInfoCount.
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    66
    self assert: ( numInfo > 0 ).
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    67
319
ff5a01879c96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 307
diff changeset
    68
    "/ handle release.
305
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    69
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    70
    "
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    71
     self run:#test02_getTypeInfoCount
7977ecd7d5f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
    72
     self new test02_getTypeInfoCount
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    "
307
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    74
!
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    75
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    76
test03_coInitialize
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 319
diff changeset
    77
    OleCom coInitialize.
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 319
diff changeset
    78
    OleCom coUninitialize.
307
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    79
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    80
    "
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    81
     self run:#test03_coInitialize
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    82
     self new test03_coInitialize
3999aae795d5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 306
diff changeset
    83
    "
302
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
! !
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
!OS_OLE_Tests class methodsFor:'documentation'!
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
version
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    ^ '$Header$'
20e3b5826f86 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
! !