File tree 1 file changed +1
-16
lines changed
1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -215,25 +215,10 @@ func TestAccessWithWrongTypePanics(t *testing.T) {
215
215
var av DynamoDBAttributeValue
216
216
err := json .Unmarshal ([]byte (testCase .input ), & av )
217
217
assert .Nil (t , err )
218
- // may use PanicsWithValue(expectedError) when it is available
219
- assertPanicsWithValue (t , testCase .expectedError , func () { testCase .accessor (av ) })
218
+ assert .PanicsWithValue (t , testCase .expectedError , func () { testCase .accessor (av ) })
220
219
}
221
220
}
222
221
223
- func assertPanicsWithValue (t * testing.T , expected error , action func ()) {
224
- defer func () {
225
- r := recover ()
226
- if r == nil {
227
- t .Errorf ("Should have panicked" )
228
- }
229
- if r != expected {
230
- t .Errorf ("should have panicked with value %v but panicked with value %v" , expected , r )
231
- }
232
- }()
233
-
234
- action ()
235
- }
236
-
237
222
func TestMarshalAndUnmarshalString (t * testing.T ) {
238
223
const inputString = "INPUT STRING"
239
224
inputValue := NewStringAttribute (inputString )
You can’t perform that action at this time.
0 commit comments