diff options
author | Oliver Bolte <obo@openoffice.org> | 2003-09-04 09:53:52 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2003-09-04 09:53:52 +0000 |
commit | e8563608ebb01c77cc5023091843867ad22dae40 (patch) | |
tree | 6dfa0f920ec7d38253a41264a0e4e474d90780dc /cppu | |
parent | c6a21f8418e8eff0349c67c68a42d4e4183cca80 (diff) |
INTEGRATION: CWS cliuno01 (1.25.30); FILE MERGED
2003/09/01 16:51:53 dbo 1.25.30.2: #107130# C++ bool
2003/07/24 15:19:08 dbo 1.25.30.1: - sequence reallocation fix
- more code cleanup
- test code
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/test/testcppu.cxx | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/cppu/test/testcppu.cxx b/cppu/test/testcppu.cxx index 1ebc678e4c48..2b8d7837f5be 100644 --- a/cppu/test/testcppu.cxx +++ b/cppu/test/testcppu.cxx @@ -2,9 +2,9 @@ * * $RCSfile: testcppu.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: dbo $ $Date: 2002-08-19 07:18:49 $ + * last change: $Author: obo $ $Date: 2003-09-04 10:53:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -120,6 +120,30 @@ sal_Int32 getSize( const Type & rT ) */ void testCppu() { + sal_Int32 big = 0x7fffffff; + try + { + Sequence< Sequence< Any > > seq( big ); + } + catch (::std::bad_alloc &) + { + } + try + { + Sequence< Sequence< Any > > seq( 0, big ); + } + catch (::std::bad_alloc &) + { + } + try + { + Sequence< Sequence< Any > > seq; + seq.realloc( big ); + } + catch (::std::bad_alloc &) + { + } + { // test the size of types OSL_ENSURE( sizeof( Uik ) == getSize( getCppuType( (Uik *)0) ), @@ -359,6 +383,10 @@ nPos = (sal_Int32)&((Test3 *)0)->aAny; { // test any + Any tb; + tb <<= true; + OSL_ASSERT( tb.getValueType() == ::getCppuBooleanType() ); + OSL_ASSERT( tb == makeAny( true ) ); Any aAny = makeAny( (sal_Int8)2 ); OSL_ASSERT( aAny.getValueType() == getCppuType( (sal_Int8 *)0 ) ); OSL_ASSERT( *(sal_Int8*)aAny.getValue() == 2 ); |