Skip to content

Commit

Permalink
Updated test.
Browse files Browse the repository at this point in the history
  • Loading branch information
KFoxder committed Apr 18, 2024
1 parent ff0e3fc commit 7bfdf5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
16 changes: 11 additions & 5 deletions config/ppx.t/cond_module.ml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
module type M = sig
module type A = sig
val best_band_in_the_world : string [@@cfg (value = "1")]
val worst_band_in_the_world : string [@@cfg (value = "2")]
val get_lower_case_band_name : string -> string [@@cfg (value = "2")]
val get_upper_case_band_name : string -> string [@@cfg (value = "1")]
end

module O:M = struct
module B:A = struct
let best_band_in_the_world = "RUSH" [@@cfg (value = "1")]
let worst_band_in_the_world = "Nickelback" [@@cfg (value = "2")]
let get_lower_case_band_name name = name [@@cfg (value = "2")]
let get_upper_case_band_name name = name [@@cfg (value = "1")]
end

module N : sig
module C : sig
val best_band_in_the_world : string [@@cfg (value = "1")]
val worst_band_in_the_world : string [@@cfg (value = "2")]
end = struct
let best_band_in_the_world = "RUSH" [@@cfg (value = "1")]
let worst_band_in_the_world = "Nickelback" [@@cfg (value = "2")]
end

let rush () = N.best_band_in_the_world
let nickelback () = N.worst_band_in_the_world [@@cfg (value = "2")]
module D = struct
let best_band_in_the_world = "RUSH" [@@cfg (value = "1")]
let worst_band_in_the_world = "Nickelback" [@@cfg (value = "2")]
end
[@@cfg (value = "2")]

let rush () = C.best_band_in_the_world
let nickelback () = C.worst_band_in_the_world [@@cfg (value = "2")]
8 changes: 4 additions & 4 deletions config/ppx.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,16 @@
unsafe_string = false;
cookies = []
}]
module type M =
module type A =
sig
val best_band_in_the_world : string[@@cfg value = "1"]
val get_upper_case_band_name : string -> string[@@cfg value = "1"]
end
module O : M =
module B : A =
struct
let best_band_in_the_world = "RUSH"[@@cfg value = "1"]
let get_upper_case_band_name name = name[@@cfg value = "1"]
end
module N : sig val best_band_in_the_world : string[@@cfg value = "1"] end =
module C : sig val best_band_in_the_world : string[@@cfg value = "1"] end =
struct let best_band_in_the_world = "RUSH"[@@cfg value = "1"] end
let rush () = N.best_band_in_the_world
let rush () = C.best_band_in_the_world

0 comments on commit 7bfdf5c

Please sign in to comment.