diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-01-23 22:28:27 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-01-23 22:29:15 +0100 |
commit | 6c0a26274629ae4f83105aa5f038d21b5c8ca7d0 (patch) | |
tree | ee99c4577644affd61e3d28a54c8e40b30b4ee46 /test/inc | |
parent | f94399ef8023ad3b21528ecdc00e44366d4c3fe5 (diff) |
add new interface tests for some common data structures
Diffstat (limited to 'test/inc')
-rw-r--r-- | test/inc/test/container/xelementaccess.hxx | 52 | ||||
-rw-r--r-- | test/inc/test/container/xindexaccess.hxx | 53 |
2 files changed, 105 insertions, 0 deletions
diff --git a/test/inc/test/container/xelementaccess.hxx b/test/inc/test/container/xelementaccess.hxx new file mode 100644 index 000000000000..a9b897e3b82c --- /dev/null +++ b/test/inc/test/container/xelementaccess.hxx @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard@googlemail.com> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <com/sun/star/uno/Type.hxx> +#include <com/sun/star/uno/Reference.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class XElementAccess +{ +public: + XElementAccess(uno::Type& rType): maType(rType) {} + + void testGetElementType(); + void testHasElements(); + + virtual uno::Reference< uno::XInterface > init() = 0; + +private: + uno::Type maType; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/test/inc/test/container/xindexaccess.hxx b/test/inc/test/container/xindexaccess.hxx new file mode 100644 index 000000000000..bd09a8f870d6 --- /dev/null +++ b/test/inc/test/container/xindexaccess.hxx @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * Copyright (C) 2011 Markus Mohrhard <markus.mohrhard@googlemail.com> (initial developer) + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <com/sun/star/uno/Reference.hxx> + +using namespace com::sun::star; + +namespace apitest { + +class XIndexAccess +{ +public: + XIndexAccess(sal_Int32 nItems); + + virtual uno::Reference< uno::XInterface > init() = 0; + void testGetCount(); + void testGetByIndex(); + // will throw an exception and should fail if not + void testGetByIndexException(); + + +private: + sal_Int32 mnItems; +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |