1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798(** This file constructs examples for expect test coverage. In [Helpers], we supplement
these examples with quickcheck tests. Having manually-constructed examples gives us
some idea of what cases we have covered, and gives us a deterministic set of inputs
for which the expect tests can print outputs. *)open!Core(** Inputs to functions like [Path.is_prefix]. *)moduleWith_prefix=structtype'at={t:'a;prefix:'a}[@@derivingcompare,equal,quickcheck,sexp_of]end(** Inputs to functions like [Path.chop_suffix]. *)moduleWith_suffix=structtype'at={t:'a;suffix:File_path.Relative.t}[@@derivingcompare,equal,quickcheck,sexp_of]end(** All modules need these examples. *)moduletypeCommon=sigtypetvalstrings_for_of_string:stringlistvalfor_append_to_basename:(t*string)listvalfor_compare:tlistvalfor_conversion:tlistend(** We need examples of lists of parts. *)moduletypePart=sigincludeCommonvallists_for_conversion:tlistlistend(** Every compound path type needs these examples. *)moduletypeCompound=sigincludeCommonvalfor_basename_and_dirname:tlistvalfor_append_part:(t*File_path.Part.t)listvalfor_chop_prefix:tWith_prefix.tlistvalfor_chop_suffix:tWith_suffix.tlistvalfor_append:(t*File_path.Relative.t)listvalfor_simplify:tlistend(** Absolute paths have no additional examples. *)moduletypeAbsolute=sigincludeCompoundend(** Relative paths support top directory access and prepending. *)moduletypeRelative=sigincludeCompoundvalfor_top_dir:tlistvalfor_prepend_part:(File_path.Part.t*t)listend(** Generic paths need examples for absolute/relative conversions. *)moduletypePath=sigincludeCompoundvalfor_make_absolute:(t*File_path.Absolute.t)listvalfor_make_relative:(t*File_path.Absolute.t)listvalvariant_for_conversion:File_path.Variant.tlistendmoduletypeExamples=sigmoduleWith_prefix:sigincludemoduletypeofstructincludeWith_prefixendincludeInvariant.S1withtype'at:='atendmoduleWith_suffix:sigincludemoduletypeofstructincludeWith_suffixendincludeInvariant.S1withtype'at:='atendmodulePart:Partwithtypet:=File_path.Part.tmoduleRelative:Relativewithtypet:=File_path.Relative.tmoduleAbsolute:Absolutewithtypet:=File_path.Absolute.tincludePathwithtypet:=File_path.tend