(t *testing.T)
| 977 | } |
| 978 | |
| 979 | func TestQualifiedTypeName(t *testing.T) { |
| 980 | var ( |
| 981 | array = &Array{ |
| 982 | ElemType: &AttributeExpr{ |
| 983 | Type: String, |
| 984 | }, |
| 985 | } |
| 986 | mapStringString = &Map{ |
| 987 | KeyType: &AttributeExpr{ |
| 988 | Type: String, |
| 989 | }, |
| 990 | ElemType: &AttributeExpr{ |
| 991 | Type: String, |
| 992 | }, |
| 993 | } |
| 994 | mapStringArray = &Map{ |
| 995 | KeyType: &AttributeExpr{ |
| 996 | Type: String, |
| 997 | }, |
| 998 | ElemType: &AttributeExpr{ |
| 999 | Type: array, |
| 1000 | }, |
| 1001 | } |
| 1002 | mapStringMap = &Map{ |
| 1003 | KeyType: &AttributeExpr{ |
| 1004 | Type: String, |
| 1005 | }, |
| 1006 | ElemType: &AttributeExpr{ |
| 1007 | Type: mapStringString, |
| 1008 | }, |
| 1009 | } |
| 1010 | ) |
| 1011 | cases := map[string]struct { |
| 1012 | t DataType |
| 1013 | expected string |
| 1014 | }{ |
| 1015 | "boolean": { |
| 1016 | t: Boolean, |
| 1017 | expected: "boolean", |
| 1018 | }, |
| 1019 | "int": { |
| 1020 | t: Int, |
| 1021 | expected: "int", |
| 1022 | }, |
| 1023 | "int32": { |
| 1024 | t: Int32, |
| 1025 | expected: "int32", |
| 1026 | }, |
| 1027 | "int64": { |
| 1028 | t: Int64, |
| 1029 | expected: "int64", |
| 1030 | }, |
| 1031 | "uint": { |
| 1032 | t: UInt, |
| 1033 | expected: "uint", |
| 1034 | }, |
| 1035 | "uint32": { |
| 1036 | t: UInt32, |
nothing calls this directly
no test coverage detected