Skip to content

Commit

Permalink
chore: promote tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Aug 6, 2023
1 parent 377b21b commit e039d6a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/ffi-error-debug.t
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
> unit -> unit = "err" [@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 3, characters 26-33:
3 | unit -> unit = "err" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
File "x.ml", lines 1-3, characters 0-34:
1 | external err :
2 | ?hi_should_error:([`a of int | `b of string ] [@mel.string]) ->
Expand All @@ -47,6 +52,11 @@ Each [@mel.unwrap] variant constructor requires an argument
> unit -> unit = "err" [@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 3, characters 26-33:
3 | unit -> unit = "err" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
File "x.ml", line 2, characters 20-36:
2 | ?hi_should_error:([`a of int | `b] [@mel.unwrap]) ->
^^^^^^^^^^^^^^^^
Expand Down
31 changes: 31 additions & 0 deletions test/blackbox-tests/legacy-ounit-cmd.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ Skip over the temporary file name printed in the error trace
$ melc -ppx melppx -bs-eval 'external mk : int -> ([`a|`b [@mel.string]]) = "mk" [@@mel.val]' 2>&1 | grep -v File
1 | external mk : int -> ([`a|`b [@mel.string]]) = "mk" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
1 | external mk : int -> ([`a|`b [@mel.string]]) = "mk" [@@mel.val]
^^^^^^^^^^
Alert unused: Unused attribute [@mel.string]
Expand Down Expand Up @@ -89,6 +94,12 @@ Skip over the temporary file name printed in the error trace
> int -> int -> (int -> int -> int [@mel.uncurry]) = "v3"[@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 2, characters 60-67:
2 | int -> int -> (int -> int -> int [@mel.uncurry]) = "v3"[@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
File "x.ml", line 2, characters 37-48:
2 | int -> int -> (int -> int -> int [@mel.uncurry]) = "v3"[@@mel.val]
^^^^^^^^^^^
Expand Down Expand Up @@ -129,6 +140,10 @@ Skip over the temporary file name printed in the error trace
$ melc -ppx melppx -bs-eval 'external mk : int -> ([`a|`b] ) = "mk" [@@mel.val]' 2>&1 | grep -v File
1 | external mk : int -> ([`a|`b] ) = "mk" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Expand All @@ -137,6 +152,11 @@ Skip over the temporary file name printed in the error trace
> external mk : int -> (_ [@mel.as {json| { x : 3 } |json}]) -> t = "mk" [@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 2, characters 75-82:
2 | external mk : int -> (_ [@mel.as {json| { x : 3 } |json}]) -> t = "mk" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Expand All @@ -145,6 +165,11 @@ Skip over the temporary file name printed in the error trace
> external mk : int -> (_ [@mel.as {json| { "x" : 3 } |json}]) -> t = "mk" [@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 2, characters 77-84:
2 | external mk : int -> (_ [@mel.as {json| { "x" : 3 } |json}]) -> t = "mk" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
// Generated by Melange
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Expand Down Expand Up @@ -259,6 +284,12 @@ Skip over the temporary file name printed in the error trace
> ) = "mk" [@@mel.val]
> EOF
$ melc -ppx melppx x.ml
File "x.ml", line 5, characters 12-19:
5 | ) = "mk" [@@mel.val]
^^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
File "x.ml", line 4, characters 5-15:
4 | [@mel.string]
^^^^^^^^^^
Expand Down
6 changes: 6 additions & 0 deletions test/blackbox-tests/mel-attributes.t
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
next release.
Use `[@mel.*]' instead.

File "x.ml", line 6, characters 26-32:
6 | unit -> unit = "err" [@@bs.val]
^^^^^^
Alert deprecated: `[@mel.val]' attributes are redundant and will be removed in the next release.
Consider removing them from any external declarations.
File "x.ml", line 5, characters 35-44:
5 | x:([`a of int | `b of string ] [@bs.string]) ->
^^^^^^^^^
Expand Down

0 comments on commit e039d6a

Please sign in to comment.