aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-12-22 14:58:37 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:12:50 -0300
commitbda44c2851c04183e1e92dccf9a43b949d0b2b0b (patch)
treec653238f1d006320a6579f6e086c71663158bdad /tests/libsample
parent2e4e0d4e91c561986a96a08b0dbee53984811155 (diff)
Added support for promoting enums from removed namespaces to upper scope.
Classes in namespaces marked not to be generated are always moved to upper scopes, the current modification add this same behaviour to enums. Tests were also added. Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/removednamespaces.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/tests/libsample/removednamespaces.h b/tests/libsample/removednamespaces.h
new file mode 100644
index 000000000..93c3fb805
--- /dev/null
+++ b/tests/libsample/removednamespaces.h
@@ -0,0 +1,62 @@
+/*
+ * 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 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 REMOVEDNAMESPACE_H
+#define REMOVEDNAMESPACE_H
+
+#include "libsamplemacros.h"
+
+namespace RemovedNamespace1
+{
+
+enum RemovedNamespace1_Enum {
+ RemovedNamespace1_Enum_Value0
+};
+
+enum {
+ RemovedNamespace1_AnonymousEnum_Value0
+};
+
+namespace RemovedNamespace2 {
+ enum RemovedNamespace2_Enum {
+ RemovedNamespace2_Enum_Value0
+ };
+}
+
+}
+
+namespace UnremovedNamespace
+{
+namespace RemovedNamespace3
+{
+ enum RemovedNamespace3_Enum {
+ RemovedNamespace3_Enum_Value0
+ };
+
+ enum {
+ RemovedNamespace3_AnonymousEnum_Value0
+ };
+}
+}
+
+#endif // REMOVEDNAMESPACE_H
+