Skip to content

Commit

Permalink
add test for V6.to_int64/of_int64 for 0:0:8000::
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Mar 13, 2023
1 parent 5c4a09b commit 299d2b9
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib_test/test_ipaddr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,16 @@ module Test_v6 = struct
addr

let test_int64_rt () =
let ((a, b) as addr) =
0x2a01_04f9_c011_87adL, 0x0_0_0_0L
in
assert_equal
~msg:(Printf.sprintf "%016Lx %016Lx" a b)
V6.(to_int64 (of_int64 addr))
addr
let tests = [
0x2a01_04f9_c011_87adL, 0x0_0_0_0L ;
0x0000_0000_8000_0000L, 0x0_0_0_0L ;
] in
List.iter (fun ((a, b) as addr) ->
assert_equal
~msg:(Printf.sprintf "%016Lx %016Lx" a b)
V6.(to_int64 (of_int64 addr))
addr)
tests

let test_prefix_string_rt () =
let subnets =
Expand Down

0 comments on commit 299d2b9

Please sign in to comment.