12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061open!ImportincludeBase.QueueincludeTest_binary_searchable.Make1_and_test(structtypenonrec'at='atletget=getletlength=lengthmoduleFor_test=structletof_arraya=letr=create()in(* We enqueue everything twice, and dequeue it once to ensure:
- that the queue has the same content as the array.
- that it has, in most cases, an interesting internal structure*)fori=0toArray.lengtha-1doenqueuera.(i)done;fori=0toArray.lengtha-1doignore(dequeue_exnr:bool);enqueuera.(i)done;r;;endend)moduleSerialization_v1=structletsexp_of_t=sexp_of_tlett_of_sexp=t_of_sexplett_sexp_grammar=t_sexp_grammarincludeBin_prot.Utils.Make_iterable_binable1(structtypenonrec'at='attype'ael='a[@@derivingbin_io]letcaller_identity=Bin_prot.Shape.Uuid.of_string"b4c84254-4992-11e6-9ba7-734e154027bd";;letmodule_name=Some"Core.Queue"letlength=lengthletiter=iterletinit~len~next=initlen~f:(fun_->next())end)endincludeSerialization_v1moduleStable=structmoduleV1=structtypenonrec'at='at[@@derivingcompare]includeSerialization_v1(* We don't have a [%bin_digest] expect test here because the bin_io is mostly hand
written, and [core_queue_unit_tests.ml] has unit tests for specific values. *)letmap=mapendend