Skip to content

Commit

Permalink
Merge pull request #172 from avsm/master
Browse files Browse the repository at this point in the history
release 3.1.1
  • Loading branch information
avsm authored Jul 13, 2017
2 parents 706b1c7 + a8954c1 commit 0a420f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
v3.1.1 2017-07-13
-----------------

- `check_alignment` now treats a large alignment as an unsigned value
and so doesnt raise a signal (#171 by @yallop)
- Improve Windows support by avoiding `void *` pointer arithmetic and
have more portable headers in the C stubs (#170 by @fdopen)

v3.1.0 2017-07-12
-----------------

Expand Down
4 changes: 4 additions & 0 deletions lib_test/tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ let check_alignment_zero () =
with
Invalid_argument _ -> ()

let check_alignment_large () =
assert_equal (Cstruct.(check_alignment (create 1) (Int64.to_int 4294967296L))) false

let _ =
let suite =
"misc tests" >::: [
Expand All @@ -142,6 +145,7 @@ let _ =
"aligned to 4096" >:: check_alignment 4096
; "aligned to 512" >:: check_alignment 512
; "aligned to 0" >:: check_alignment_zero
; "aligned to large" >:: check_alignment_large
]
]
in
Expand Down

0 comments on commit 0a420f8

Please sign in to comment.