diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-08-11 17:27:52 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-08-11 17:59:10 -0300 |
commit | 3152bd2bd728bac6ef751bb8acd64100c4ca8a83 (patch) | |
tree | ed4633d582cd30d9c171ba60fbc9ee8bb06d3a42 /tests/libsample/valueandvirtual.h | |
parent | ecfb5f1a7508cef02789363446c66bacf02ce3fa (diff) |
Created unit test to operator().
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/libsample/valueandvirtual.h')
-rw-r--r-- | tests/libsample/valueandvirtual.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/libsample/valueandvirtual.h b/tests/libsample/valueandvirtual.h new file mode 100644 index 000000000..d13a2c155 --- /dev/null +++ b/tests/libsample/valueandvirtual.h @@ -0,0 +1,53 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. Please + * review the following information to ensure the GNU Lesser General + * Public License version 2.1 requirements will be met: + * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + * + * As a special exception to the GNU Lesser General Public License + * version 2.1, the object code form of a "work that uses the Library" + * may incorporate material from a header file that is part of the + * Library. You may distribute such object code under terms of your + * choice, provided that the incorporated material (i) does not exceed + * more than 5% of the total size of the Library; and (ii) is limited to + * numerical parameters, data structure layouts, accessors, macros, + * inline functions and templates. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef VALUEANDVIRTUAL_H +#define VALUEANDVIRTUAL_H + +class ValueAndVirtual +{ +public: + ValueAndVirtual(int id) : m_id(id) {} + ValueAndVirtual(const ValueAndVirtual &other) { m_id = other.m_id; } + + bool operator()(int id, int id2) { return id == id2; } + + inline int id() { return m_id; } + virtual ~ValueAndVirtual() {}; +private: + int m_id; +}; + +#endif // VALUEANDVIRTUAL_H + |