Update of /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26491/PyCOMTest
Modified Files:
PyCOMImpl.cpp PyCOMImpl.h PyCOMTest.idl
Log Message:
Add currency tests.
Index: PyCOMTest.idl
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMTest.idl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyCOMTest.idl 25 Apr 2004 04:10:48 -0000 1.9
--- PyCOMTest.idl 31 May 2005 12:37:18 -0000 1.10
***************
*** 219,222 ****
--- 219,224 ----
[propget] HRESULT IntProp([out, retval] int* retval);
[propput] HRESULT IntProp([in] int val);
+ [propget] HRESULT CurrencyProp([out, retval] CY* retval);
+ [propput] HRESULT CurrencyProp([in] CY val);
};
Index: PyCOMImpl.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMImpl.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** PyCOMImpl.h 19 Nov 2002 05:03:24 -0000 1.8
--- PyCOMImpl.h 31 May 2005 12:37:18 -0000 1.9
***************
*** 25,28 ****
--- 25,30 ----
{
memset(m_rsArray, 0, nMaxSessions*sizeof(PyCOMTestSessionData));
+ m_cy.int64 = 0;
+ m_long = 0;
}
~CPyCOMTest();
***************
*** 92,95 ****
--- 94,99 ----
STDMETHOD(get_IntProp)(int *ret);
STDMETHOD(put_IntProp)(int val);
+ STDMETHOD(get_CurrencyProp)(CY *ret);
+ STDMETHOD(put_CurrencyProp)(CY val);
// info associated to each session
***************
*** 109,112 ****
--- 113,117 ----
SAFEARRAY *pLastArray;
long m_long;
+ CY m_cy;
};
Index: PyCOMImpl.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMImpl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyCOMImpl.cpp 19 Nov 2002 10:40:01 -0000 1.9
--- PyCOMImpl.cpp 31 May 2005 12:37:18 -0000 1.10
***************
*** 479,482 ****
--- 479,487 ----
CHECK_HR(tester->get_IntProp(&result));
CHECK_TRUE(result==4);
+ CY cy = {123, 456};
+ CY cresult;
+ CHECK_HR(tester->put_CurrencyProp(cy));
+ CHECK_HR(tester->get_CurrencyProp(&cresult));
+ CHECK_TRUE(cresult.int64==cy.int64);
// interface tests
***************
*** 564,565 ****
--- 569,584 ----
return S_OK;
}
+
+ HRESULT CPyCOMTest::put_CurrencyProp(CY val)
+ {
+ m_cy = val;
+ return S_OK;
+ }
+
+ HRESULT CPyCOMTest::get_CurrencyProp(CY *ret)
+ {
+ if (!ret)
+ return E_POINTER;
+ *ret = (CY)m_cy;
+ return S_OK;
+ }
|