Skip to content

Commit

Permalink
fixed negative test
Browse files Browse the repository at this point in the history
  • Loading branch information
brennanjl committed May 28, 2024
1 parent 20a8649 commit c632e2f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/specifications/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,10 @@ func testUint256(ctx context.Context, t *testing.T, execute ProcedureDSL, dbid s
}
assert.Equal(t, 1, count)

// test that greater than max uint256 is not allowed
uint256, err = types.Uint256FromString("115792089237316195423570985008687907853269984665640564039457584007913129639936")
require.Error(t, err)

res, err = execute.Execute(ctx, dbid, callType+"_store_uint256s", []any{uint256, uint256Arr})
require.Error(t, err)
// test that greater than max uint256 is not allowed.
// we pass it as a string since our uint256 type will also error if it exceeds max uint256
res, err = execute.Execute(ctx, dbid, callType+"_store_uint256s", []any{"115792089237316195423570985008687907853269984665640564039457584007913129639936", uint256Arr})
require.NoError(t, err)

ExpectTxfail(t, execute, ctx, res)
}
Expand Down

0 comments on commit c632e2f

Please sign in to comment.