File: selector_tests.ml

package info (click to toggle)
ppx-fields-conv 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: ml: 2,177; sh: 37; makefile: 14
file content (15 lines) | stat: -rw-r--r-- 477 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
open! Base

let%test_unit _ =
  List.iter Ppx_fields_conv.Selector.all ~f:(fun selector ->
    let sexp = Ppx_fields_conv.Selector.sexp_of_t selector in
    let round_trip = Ppx_fields_conv.Selector.t_of_sexp sexp in
    if not (Ppx_fields_conv.Selector.equal selector round_trip)
    then
      raise_s
        (Sexp.message
           "round-trip error"
           [ "selector", sexp
           ; "round_trip", Ppx_fields_conv.Selector.sexp_of_t round_trip
           ]))
;;