RegressionTests__OS_OLE_Tests.st
changeset 1702 fa257457c18a
parent 1698 4dfaff79690e
equal deleted inserted replaced
1701:48849326905a 1702:fa257457c18a
    35      Double click on the TestCase class or open a TestRunner to see me checking...
    35      Double click on the TestCase class or open a TestRunner to see me checking...
    36      - please add more methods like this..."
    36      - please add more methods like this..."
    37 
    37 
    38     |handle|
    38     |handle|
    39 
    39 
    40     "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    40     self
    41     OperatingSystem isMSWINDOWSlike ifFalse:[
    41         skipIf:OperatingSystem isMSWINDOWSlike not
    42         self skip.
    42         description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
    43     ].
       
    44 
    43 
    45     handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    44     handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    46     self assert: ( handle notNil ).
    45     self assert: ( handle notNil ).
    47     "/ handle release.
    46     "/ handle release.
    48 
    47 
    53     "
    52     "
    54      self run:#test01_loadTypeLib
    53      self run:#test01_loadTypeLib
    55      self new test01_loadTypeLib
    54      self new test01_loadTypeLib
    56     "
    55     "
    57 
    56 
    58     "Modified: / 13-09-2017 / 10:37:48 / mawalch"
    57     "Modified: / 18-09-2017 / 11:54:24 / mawalch"
    59 !
    58 !
    60 
    59 
    61 test02_getTypeInfoCount
    60 test02_getTypeInfoCount
    62     "This is a demonstration testCase - it is meant to be removed eventually.
    61     "This is a demonstration testCase - it is meant to be removed eventually.
    63      This testCase will PASS.
    62      This testCase will PASS.
    64      Double click on the TestCase class or open a TestRunner to see me checking...
    63      Double click on the TestCase class or open a TestRunner to see me checking...
    65      - please add more methods like this..."
    64      - please add more methods like this..."
    66 
    65 
    67     |handle numInfo|
    66     |handle numInfo|
    68 
    67 
    69     "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    68     self
    70     OperatingSystem isMSWINDOWSlike ifFalse:[
    69         skipIf:OperatingSystem isMSWINDOWSlike not
    71         self skip.
    70         description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
    72     ].
       
    73 
    71 
    74     handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    72     handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    75     self assert: ( handle notNil ).
    73     self assert: ( handle notNil ).
    76 
    74 
    77     numInfo := handle getTypeInfoCount.
    75     numInfo := handle getTypeInfoCount.
    82     "
    80     "
    83      self run:#test02_getTypeInfoCount
    81      self run:#test02_getTypeInfoCount
    84      self new test02_getTypeInfoCount
    82      self new test02_getTypeInfoCount
    85     "
    83     "
    86 
    84 
    87     "Modified: / 13-09-2017 / 10:38:18 / mawalch"
    85     "Modified: / 18-09-2017 / 11:54:18 / mawalch"
    88 !
    86 !
    89 
    87 
    90 test03_coInitialize
    88 test03_coInitialize
    91 
    89 
    92     "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    90     self
    93     OperatingSystem isMSWINDOWSlike ifFalse:[
    91         skipIf:OperatingSystem isMSWINDOWSlike not
    94         self skip.
    92         description:'Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)'.
    95     ].
       
    96 
    93 
    97     OleCom coInitialize.
    94     OleCom coInitialize.
    98     OleCom coUninitialize.
    95     OleCom coUninitialize.
    99 
    96 
   100     "
    97     "
   101      self run:#test03_coInitialize
    98      self run:#test03_coInitialize
   102      self new test03_coInitialize
    99      self new test03_coInitialize
   103     "
   100     "
   104 
   101 
   105     "Modified: / 13-09-2017 / 10:38:29 / mawalch"
   102     "Modified: / 18-09-2017 / 11:54:09 / mawalch"
   106 ! !
   103 ! !
   107 
   104 
   108 !OS_OLE_Tests class methodsFor:'documentation'!
   105 !OS_OLE_Tests class methodsFor:'documentation'!
   109 
   106 
   110 version
   107 version