aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/libsample/removednamespaces.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/tests/libsample/removednamespaces.h')
-rw-r--r--sources/shiboken2/tests/libsample/removednamespaces.h48
1 files changed, 27 insertions, 21 deletions
diff --git a/sources/shiboken2/tests/libsample/removednamespaces.h b/sources/shiboken2/tests/libsample/removednamespaces.h
index 1de028d38..47c18c049 100644
--- a/sources/shiboken2/tests/libsample/removednamespaces.h
+++ b/sources/shiboken2/tests/libsample/removednamespaces.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of Qt for Python.
@@ -34,35 +34,41 @@
namespace RemovedNamespace1
{
-enum RemovedNamespace1_Enum {
- RemovedNamespace1_Enum_Value0
-};
+enum RemovedNamespace1_Enum { RemovedNamespace1_Enum_Value0 = 0,
+ RemovedNamespace1_Enum_Value1 = 1 };
+
+enum { RemovedNamespace1_AnonymousEnum_Value0 };
+
+inline int mathSum(int x, int y) { return x + y; }
-enum {
- RemovedNamespace1_AnonymousEnum_Value0
+struct ObjectOnInvisibleNamespace
+{
+ bool exists() const { return true; }
+ static int toInt(RemovedNamespace1_Enum e) { return static_cast<int>(e); }
+ static ObjectOnInvisibleNamespace consume(const ObjectOnInvisibleNamespace &other) { return other; }
};
-namespace RemovedNamespace2 {
- enum RemovedNamespace2_Enum {
- RemovedNamespace2_Enum_Value0
- };
-}
+namespace RemovedNamespace2
+{
+
+enum RemovedNamespace2_Enum { RemovedNamespace2_Enum_Value0 };
-}
+} // namespace RemovedNamespace2
+} // namespace RemovedNamespace1
namespace UnremovedNamespace
{
+
namespace RemovedNamespace3
{
- enum RemovedNamespace3_Enum {
- RemovedNamespace3_Enum_Value0
- };
-
- enum {
- RemovedNamespace3_AnonymousEnum_Value0
- };
-}
-}
+ enum RemovedNamespace3_Enum { RemovedNamespace3_Enum_Value0 };
+
+ enum { RemovedNamespace3_AnonymousEnum_Value0 };
+
+ inline int nestedMathSum(int x, int y) { return x + y; }
+
+} // namespace RemovedNamespace3
+} // namespace UnremovedNamespace
#endif // REMOVEDNAMESPACE_H