aboutsummaryrefslogtreecommitdiff
path: root/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go')
-rw-r--r--tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go23
1 files changed, 19 insertions, 4 deletions
diff --git a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go
index 797ea67f..6cec5ffc 100644
--- a/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go
+++ b/tests/namespace_test/NamespaceA/NamespaceB/EnumInNestedNS.go
@@ -2,7 +2,10 @@
package NamespaceB
-type EnumInNestedNS = int8
+import "strconv"
+
+type EnumInNestedNS int8
+
const (
EnumInNestedNSA EnumInNestedNS = 0
EnumInNestedNSB EnumInNestedNS = 1
@@ -10,8 +13,20 @@ const (
)
var EnumNamesEnumInNestedNS = map[EnumInNestedNS]string{
- EnumInNestedNSA:"A",
- EnumInNestedNSB:"B",
- EnumInNestedNSC:"C",
+ EnumInNestedNSA: "A",
+ EnumInNestedNSB: "B",
+ EnumInNestedNSC: "C",
}
+var EnumValuesEnumInNestedNS = map[string]EnumInNestedNS{
+ "A": EnumInNestedNSA,
+ "B": EnumInNestedNSB,
+ "C": EnumInNestedNSC,
+}
+
+func (v EnumInNestedNS) String() string {
+ if s, ok := EnumNamesEnumInNestedNS[v]; ok {
+ return s
+ }
+ return "EnumInNestedNS(" + strconv.FormatInt(int64(v), 10) + ")"
+}