()
| 68 | } |
| 69 | |
| 70 | func createNoValidationValues() structNoValidationValues { |
| 71 | integer := 1 |
| 72 | s := structNoValidationValues{ |
| 73 | Boolean: true, |
| 74 | Uinteger: 1 << 29, |
| 75 | Integer: -10000, |
| 76 | Integer8: 120, |
| 77 | Integer16: -20000, |
| 78 | Integer32: 1 << 29, |
| 79 | Integer64: 1 << 61, |
| 80 | Uinteger8: 250, |
| 81 | Uinteger16: 50000, |
| 82 | Uinteger32: 1 << 31, |
| 83 | Uinteger64: 1 << 62, |
| 84 | Float32: 123.456, |
| 85 | Float64: 123.456789, |
| 86 | String: "text", |
| 87 | Date: time.Time{}, |
| 88 | CustomInterface: &bytes.Buffer{}, |
| 89 | Struct: substructNoValidation{}, |
| 90 | IntSlice: []int{-3, -2, 1, 0, 1, 2, 3}, |
| 91 | IntPointerSlice: []*int{&integer}, |
| 92 | StructSlice: []substructNoValidation{}, |
| 93 | UniversalInterface: 1.2, |
| 94 | FloatMap: map[string]float32{ |
| 95 | "foo": 1.23, |
| 96 | "bar": 232.323, |
| 97 | }, |
| 98 | StructMap: mapNoValidationSub{ |
| 99 | "foo": substructNoValidation{}, |
| 100 | "bar": substructNoValidation{}, |
| 101 | }, |
| 102 | // StructPointerSlice []noValidationSub |
| 103 | // InterfaceSlice []testInterface |
| 104 | } |
| 105 | s.InlinedStruct.Integer = 1000 |
| 106 | s.InlinedStruct.String = []string{"first", "second"} |
| 107 | s.IString = "substring" |
| 108 | s.IInt = 987654 |
| 109 | return s |
| 110 | } |
| 111 | |
| 112 | func TestValidateNoValidationValues(t *testing.T) { |
| 113 | origin := createNoValidationValues() |
no outgoing calls
no test coverage detected