Last active
July 9, 2017 01:56
-
-
Save kunigami/2105c527f7cab21ef121cae02a72a5b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* TestBase.ml *) | |
module MakeTest(Queue: IQueue) = | |
struct | |
let testSingleInsertion text_ctx = | |
let result = Queue.push 10 Queue.newEmpty in | |
let resultAsList = Queue.toList result in | |
assert_equal | |
~msg:"Should insert one element properly" | |
resultAsList | |
[10] | |
;; | |
... | |
let run = run_test_tt_main suite | |
end | |
;; | |
(* RealTimeQueueTest.ml *) | |
open RealTimeQueue;; | |
open TestBase;; | |
module RealTimeQueueTest = TestBase.MakeTest(RealTimeQueue);; | |
let () = | |
RealTimeQueueTest.run | |
;; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment