Sha256: a5eefa3cc9e1a3e90d823c6b6b185d070f41643ce9f255cadc93c417a9dc7ff5
Contents?: true
Size: 785 Bytes
Versions: 60
Compression:
Stored size: 785 Bytes
Contents
open Core open Utils open Yojson.Basic type case = { description: string; parameters: (string * json) list; expected: json; } type test = {name: string; cases: case list} type tests = | Single of case list | Suite of test list type canonical_data = { version: string option; tests: tests } let rec json_to_string (j: json): string = match j with | `Null -> "null" | `String s -> "\"" ^ (String.escaped s) ^ "\"" | `Float f -> Float.to_string f | `Int n -> Int.to_string n | `Bool b -> Bool.to_string b | `List xs -> "[" ^ String.concat ~sep:"; " (List.map ~f:json_to_string xs) ^ "]" | `Assoc xs -> "[" ^ String.concat ~sep:"; " (List.map xs ~f:(fun (k,v) -> "(\"" ^ String.escaped k ^ "\", " ^ json_to_string v ^ ")")) ^ "]"
Version data entries
60 entries across 60 versions & 1 rubygems