diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-10-12 10:05:23 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-10-12 10:05:23 +0000 |
commit | 2edea56b0a442ab65cef1024917ed95ca4207175 (patch) | |
tree | 6b5379c73941ae763cacc899585c8fa93c6afdf8 /cppu/source/uno | |
parent | 3bb252e1dcb881fbdb0f001f02ae73687cd2bc42 (diff) |
#92951# added test cases
Diffstat (limited to 'cppu/source/uno')
-rw-r--r-- | cppu/source/uno/data.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index a902c35811cc..3b16f7078a92 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -2,9 +2,9 @@ * * $RCSfile: data.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: dbo $ $Date: 2001-10-12 10:55:46 $ + * last change: $Author: dbo $ $Date: 2001-10-12 11:05:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -295,6 +295,15 @@ sal_Bool SAL_CALL uno_assignData( #define OFFSET_OF( s, m ) ((sal_Size)((char *)&((s *)16)->m -16)) +struct C +{ + sal_Int16 d; +}; +struct C2 : public C +{ + sal_Int32 e; +}; + struct D { sal_Int16 d; @@ -421,6 +430,16 @@ BinaryCompatible_Impl::BinaryCompatible_Impl() OSL_ENSURE( 0, "### unexpected struct alignment?!" ); abort(); } + if( sizeof(C) != 2 || sizeof(C2) != 8 ) + { + OSL_ENSURE( 0, "### unexpected struct alignment?!" ); + abort(); + } + if( OFFSET_OF( C2, e ) != 4 ) + { + OSL_ENSURE( 0, "### unexpected struct alignment?!" ); + abort(); + } #ifdef SAL_W32 if( sizeof( P ) != 24 ) { |