RegressionTests__OS_OLE_Tests.st
author sr
Mon, 18 Sep 2017 11:50:50 +0200
changeset 1701 48849326905a
parent 1698 4dfaff79690e
child 1702 fa257457c18a
permissions -rw-r--r--
#BUGFIX by sr class: RegressionTests::OperationInQueueTests changed: #test incremented the time range... because the test did fail sometime, may due to tide timinings

"{ Package: 'stx:goodies/regression' }"

"{ NameSpace: RegressionTests }"

TestCase subclass:#OS_OLE_Tests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'OS-Testing'
!

!OS_OLE_Tests class methodsFor:'documentation'!

documentation
"
    documentation to be added.

    [author:]
	cg (cg@FUSI)

    [instance variables:]

    [class variables:]

    [see also:]

"
! !

!OS_OLE_Tests methodsFor:'tests'!

test01_loadTypeLib
    "This is a demonstration testCase - it is meant to be removed eventually.
     This testCase will PASS.
     Double click on the TestCase class or open a TestRunner to see me checking...
     - please add more methods like this..."

    |handle|

    "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    OperatingSystem isMSWINDOWSlike ifFalse:[
        self skip.
    ].

    handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    self assert: ( handle notNil ).
    "/ handle release.

    handle := OleCom::ITypeLib loadTypeLib:'c:\WINDOWS\system32\Macromed\Flash\swflash.ocx'.
    self assert: ( handle notNil ).
    "/ handle release.

    "
     self run:#test01_loadTypeLib
     self new test01_loadTypeLib
    "

    "Modified: / 13-09-2017 / 10:37:48 / mawalch"
!

test02_getTypeInfoCount
    "This is a demonstration testCase - it is meant to be removed eventually.
     This testCase will PASS.
     Double click on the TestCase class or open a TestRunner to see me checking...
     - please add more methods like this..."

    |handle numInfo|

    "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    OperatingSystem isMSWINDOWSlike ifFalse:[
        self skip.
    ].

    handle := OleCom::ITypeLib loadTypeLib:'C:\WINDOWS\system32\stdole32.tlb'.
    self assert: ( handle notNil ).

    numInfo := handle getTypeInfoCount.
    self assert: ( numInfo > 0 ).

    "/ handle release.

    "
     self run:#test02_getTypeInfoCount
     self new test02_getTypeInfoCount
    "

    "Modified: / 13-09-2017 / 10:38:18 / mawalch"
!

test03_coInitialize

    "/ Only implemented on Windows (adjust if this is ever ported to macOS, OS/2, ...)
    OperatingSystem isMSWINDOWSlike ifFalse:[
        self skip.
    ].

    OleCom coInitialize.
    OleCom coUninitialize.

    "
     self run:#test03_coInitialize
     self new test03_coInitialize
    "

    "Modified: / 13-09-2017 / 10:38:29 / mawalch"
! !

!OS_OLE_Tests class methodsFor:'documentation'!

version
    ^ '$Header$'
! !