-
Notifications
You must be signed in to change notification settings - Fork 101
improve generator tests #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
81602ac
delete test cases from test dir
lubegasimon c2a30fe
delete html dir and its content from test dir
lubegasimon c992857
delete latex dir and its content from test dir
lubegasimon e8f6963
delete man dir and its content from test dir
lubegasimon 11ef243
add test cases
lubegasimon c389f4d
modify Makefile
lubegasimon 07ffb39
handled cases post ocaml_version 4.08
lubegasimon 2c2eae9
handled cases pre ocaml_version 4.08
lubegasimon ad05e71
add utility libs
lubegasimon 4888e22
rm unnecessary file
lubegasimon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Foo = struct | ||
module A = struct | ||
type t = A | ||
end | ||
|
||
module B = struct | ||
type t = B | ||
end | ||
end | ||
|
||
open (Foo : module type of Foo with module A := Foo.A) | ||
|
||
module B = B | ||
|
||
open Set.Make (struct | ||
type t = Foo.A.t | ||
|
||
let compare = compare | ||
end) | ||
|
||
type u = t | ||
|
||
module type S = sig | ||
module F (_ : sig end) : sig | ||
type t | ||
end | ||
|
||
module X : sig end | ||
|
||
open F(X) | ||
|
||
val f : t | ||
end | ||
|
||
open Foo | ||
|
||
(* Check that regular open still works as expected *) | ||
module B' = B |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(include link.dune.inc) | ||
|
||
(rule | ||
(deps | ||
(glob_files cases/*)) | ||
(enabled_if | ||
(>= %{ocaml_version} 4.08)) | ||
(action | ||
(with-stdout-to | ||
link.dune.inc.gen | ||
(pipe-stdout | ||
(run gen_link/gen_link.exe) | ||
(run dune format-dune-file))))) | ||
|
||
(rule | ||
(enabled_if | ||
(>= %{ocaml_version} 4.08)) | ||
(alias runtest) | ||
(action | ||
(diff link.dune.inc link.dune.inc.gen))) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(executable | ||
(name gen_link) | ||
(libraries gen_link_lib) | ||
(enabled_if | ||
(>= %{ocaml_version} 4.04))) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let () = | ||
let paths = | ||
Gen_link_lib.read_file_from_dir (Fpath.filename Gen_link_lib.cases) | ||
in | ||
let paths = | ||
List.filter (fun p -> not (Gen_link_lib.is_dot_ocamlformat p)) paths | ||
in | ||
let stanzas = Gen_link_lib.gen_rule paths "4.08" in | ||
List.iter (Sexplib0.Sexp.pp Format.std_formatter) stanzas |
19 changes: 19 additions & 0 deletions
19
test/generators/cases_post408/html/Bugs_post_406.class-let_open'.index.html
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>let_open' (test.Bugs_post_406.let_open')</title> | ||
<link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="../../../highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="../index.html">Up</a> – | ||
<a href="../../index.html">test</a> » | ||
<a href="../index.html">Bugs_post_406</a> » let_open' | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Class <code><span>Bugs_post_406.let_open'</span></code></h1> | ||
</header><div class="odoc-content"></div> | ||
</body> | ||
</html> |
19 changes: 19 additions & 0 deletions
19
test/generators/cases_post408/html/Bugs_post_406.class-type-let_open.index.html
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>let_open (test.Bugs_post_406.let_open)</title> | ||
<link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="../../../highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="../index.html">Up</a> – | ||
<a href="../../index.html">test</a> » | ||
<a href="../index.html">Bugs_post_406</a> » let_open | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Class type <code><span>Bugs_post_406.let_open</span></code></h1> | ||
</header><div class="odoc-content"></div> | ||
</body> | ||
</html> |
48 changes: 48 additions & 0 deletions
48
test/generators/cases_post408/html/Bugs_post_406.index.html
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>Bugs_post_406 (test.Bugs_post_406)</title> | ||
<link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="../../highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="../index.html">Up</a> – | ||
<a href="../index.html">test</a> » Bugs_post_406 | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Module <code><span>Bugs_post_406</span></code></h1> | ||
<p>Let-open in class types, https://github.com/ocaml/odoc/issues/543 | ||
This was added to the language in 4.06 | ||
</p> | ||
</header> | ||
<div class="odoc-content"> | ||
<div class="odoc-spec"> | ||
<div class="spec class-type" id="class-type-let_open" class="anchored"> | ||
<a href="#class-type-let_open" class="anchor"></a> | ||
<code> | ||
<span><span class="keyword">class</span> | ||
<span class="keyword">type</span> | ||
</span> | ||
<span><a href="class-type-let_open/index.html">let_open</a></span> | ||
<span> = <span class="keyword">object</span> ... | ||
<span class="keyword">end</span> | ||
</span> | ||
</code> | ||
</div> | ||
</div> | ||
<div class="odoc-spec"> | ||
<div class="spec class" id="class-let_open'" class="anchored"> | ||
<a href="#class-let_open'" class="anchor"></a> | ||
<code><span><span class="keyword">class</span> </span> | ||
<span><a href="class-let_open'/index.html">let_open'</a></span> | ||
<span> : <span class="keyword">object</span> ... | ||
<span class="keyword">end</span> | ||
</span> | ||
</code> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>A (test.Labels.A)</title> | ||
<link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="../../../highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="../index.html">Up</a> – | ||
<a href="../../index.html">test</a> » | ||
<a href="../index.html">Labels</a> » A | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Module <code><span>Labels.A</span></code></h1> | ||
</header> | ||
<nav class="odoc-toc"> | ||
<ul><li><a href="#L3">Attached to module</a></li></ul> | ||
</nav> | ||
<div class="odoc-content"> | ||
<h2 id="L3"><a href="#L3" class="anchor"></a>Attached to module</h2> | ||
</div> | ||
</body> | ||
</html> |
24 changes: 24 additions & 0 deletions
24
test/generators/cases_post408/html/Labels.class-c.index.html
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head><title>c (test.Labels.c)</title> | ||
<link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/> | ||
<meta name="generator" content="odoc %%VERSION%%"/> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"/> | ||
<script src="../../../highlight.pack.js"></script> | ||
<script>hljs.initHighlightingOnLoad();</script> | ||
</head> | ||
<body class="odoc"> | ||
<nav class="odoc-nav"><a href="../index.html">Up</a> – | ||
<a href="../../index.html">test</a> » | ||
<a href="../index.html">Labels</a> » c | ||
</nav> | ||
<header class="odoc-preamble"> | ||
<h1>Class <code><span>Labels.c</span></code></h1> | ||
</header> | ||
<nav class="odoc-toc"><ul><li><a href="#L6">Attached to class</a></li></ul> | ||
</nav> | ||
<div class="odoc-content"> | ||
<h2 id="L6"><a href="#L6" class="anchor"></a>Attached to class</h2> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.