diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-06-02 17:31:05 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:15:25 -0300 |
commit | e3c2d6c3fae088185ab83e19a65190e28120a3ee (patch) | |
tree | df35de4d903fc9f240a06839ac86122371b07cb3 /tests/libsample | |
parent | 9c172e94cb5d2fd263a653a5515f02194cf3279d (diff) |
Test for bug 464 - "Can't create target lang package and namespace with the same name"
Diffstat (limited to 'tests/libsample')
-rw-r--r-- | tests/libsample/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/libsample/sample.cpp | 33 | ||||
-rw-r--r-- | tests/libsample/sample.h | 42 |
3 files changed, 76 insertions, 0 deletions
diff --git a/tests/libsample/CMakeLists.txt b/tests/libsample/CMakeLists.txt index b2ac420ce..326b614cf 100644 --- a/tests/libsample/CMakeLists.txt +++ b/tests/libsample/CMakeLists.txt @@ -29,6 +29,7 @@ pointf.cpp polygon.cpp protected.cpp reference.cpp +sample.cpp samplenamespace.cpp simplefile.cpp size.cpp diff --git a/tests/libsample/sample.cpp b/tests/libsample/sample.cpp new file mode 100644 index 000000000..7e0a78f8a --- /dev/null +++ b/tests/libsample/sample.cpp @@ -0,0 +1,33 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "sample.h" + +sample::sample::sample(int value) : m_value(value) +{ +} + +int sample::sample::value() const +{ + return m_value; +} + diff --git a/tests/libsample/sample.h b/tests/libsample/sample.h new file mode 100644 index 000000000..a789aeac1 --- /dev/null +++ b/tests/libsample/sample.h @@ -0,0 +1,42 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SAMPLE_H +#define SAMPLE_H + +#include "libsamplemacros.h" + +// namespace with the same name of the current package to try to mess up with the generator +namespace sample +{ + // to increase the mess we add a class with the same name of the package/namespace + class LIBSAMPLE_API sample + { + public: + sample(int value = 0); + int value() const; + private: + int m_value; + }; +} + +#endif |