Skip to content

Commit d4a8c50

Browse files
committed
Split the class test case in two
Floating comments in classes are 4.08 and beyond
1 parent 9f88aff commit d4a8c50

24 files changed

+306
-119
lines changed

test/generators/cases/class.mli

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,3 @@ end
2525

2626
class ['a] polymorphic' : ['a] polymorphic
2727

28-
(* Comments *)
29-
30-
class x : object end
31-
32-
class ['a] c :
33-
object
34-
inherit x
35-
(** Inherit. *)
36-
37-
constraint 'a = int
38-
(** Constraint. *)
39-
40-
(**/**)
41-
42-
method foo : int
43-
44-
(**/**)
45-
46-
(** Floating comment. *)
47-
48-
method bar : int
49-
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class x : object end
2+
3+
class ['a] c :
4+
object
5+
inherit x
6+
(** Inherit. *)
7+
8+
constraint 'a = int
9+
(** Constraint. *)
10+
11+
(**/**)
12+
13+
method foo : int
14+
15+
(**/**)
16+
17+
(** Floating comment. *)
18+
19+
method bar : int
20+
end

test/generators/gen_rules/gen_rules.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ let constraints =
5454
("recent_impl.ml", Min "4.09");
5555
("bugs_pre_410.ml", Max "4.09");
5656
("module_type_subst.mli", Min "4.13");
57+
("class_comments.mli", Min "4.08");
5758
]
5859

5960
let test_cases_dir = Fpath.v "cases"

test/generators/html/Class.html

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -126,28 +126,6 @@ <h1>Module <code><span>Class</span></code></h1>
126126
</code>
127127
</div>
128128
</div>
129-
<div class="odoc-spec">
130-
<div class="spec class anchored" id="class-x">
131-
<a href="#class-x" class="anchor"></a>
132-
<code><span><span class="keyword">class</span> </span>
133-
<span><a href="Class-class-x.html">x</a></span>
134-
<span> : <span class="keyword">object</span> ...
135-
<span class="keyword">end</span>
136-
</span>
137-
</code>
138-
</div>
139-
</div>
140-
<div class="odoc-spec">
141-
<div class="spec class anchored" id="class-c">
142-
<a href="#class-c" class="anchor"></a>
143-
<code><span><span class="keyword">class</span> 'a </span>
144-
<span><a href="Class-class-c.html">c</a></span>
145-
<span> : <span class="keyword">object</span> ...
146-
<span class="keyword">end</span>
147-
</span>
148-
</code>
149-
</div>
150-
</div>
151129
</div>
152130
</body>
153131
</html>

test/generators/html/Class-class-c.html renamed to test/generators/html/Class_comments-class-c.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
3-
<head><title>c (Class.c)</title><link rel="stylesheet" href="odoc.css"/>
4-
<meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/>
3+
<head><title>c (Class_comments.c)</title>
4+
<link rel="stylesheet" href="odoc.css"/><meta charset="utf-8"/>
5+
<meta name="generator" content="odoc %%VERSION%%"/>
56
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
67
<script src="highlight.pack.js"></script>
78
<script>hljs.initHighlightingOnLoad();</script>
89
</head>
910
<body class="odoc">
10-
<nav class="odoc-nav"><a href="Class.html">Up</a>
11-
<a href="Class.html">Class</a> &#x00BB; c
11+
<nav class="odoc-nav"><a href="Class_comments.html">Up</a>
12+
<a href="Class_comments.html">Class_comments</a> &#x00BB; c
1213
</nav>
1314
<header class="odoc-preamble">
14-
<h1>Class <code><span>Class.c</span></code></h1>
15+
<h1>Class <code><span>Class_comments.c</span></code></h1>
1516
</header>
1617
<div class="odoc-content">
1718
<div class="odoc-spec">
1819
<div class="spec inherit">
1920
<code>
2021
<span><span class="keyword">inherit</span>
21-
<a href="Class-class-x.html">x</a>
22+
<a href="Class_comments-class-x.html">x</a>
2223
</span>
2324
</code>
2425
</div><div class="spec-doc"><p>Inherit.</p></div>
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml">
3-
<head><title>x (Class.x)</title><link rel="stylesheet" href="odoc.css"/>
4-
<meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/>
3+
<head><title>x (Class_comments.x)</title>
4+
<link rel="stylesheet" href="odoc.css"/><meta charset="utf-8"/>
5+
<meta name="generator" content="odoc %%VERSION%%"/>
56
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
67
<script src="highlight.pack.js"></script>
78
<script>hljs.initHighlightingOnLoad();</script>
89
</head>
910
<body class="odoc">
10-
<nav class="odoc-nav"><a href="Class.html">Up</a>
11-
<a href="Class.html">Class</a> &#x00BB; x
11+
<nav class="odoc-nav"><a href="Class_comments.html">Up</a>
12+
<a href="Class_comments.html">Class_comments</a> &#x00BB; x
1213
</nav>
1314
<header class="odoc-preamble">
14-
<h1>Class <code><span>Class.x</span></code></h1>
15+
<h1>Class <code><span>Class_comments.x</span></code></h1>
1516
</header><div class="odoc-content"></div>
1617
</body>
1718
</html>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head><title>Class_comments (Class_comments)</title>
4+
<link rel="stylesheet" href="odoc.css"/><meta charset="utf-8"/>
5+
<meta name="generator" content="odoc %%VERSION%%"/>
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
7+
<script src="highlight.pack.js"></script>
8+
<script>hljs.initHighlightingOnLoad();</script>
9+
</head>
10+
<body class="odoc">
11+
<header class="odoc-preamble">
12+
<h1>Module <code><span>Class_comments</span></code></h1>
13+
</header>
14+
<div class="odoc-content">
15+
<div class="odoc-spec">
16+
<div class="spec class anchored" id="class-x">
17+
<a href="#class-x" class="anchor"></a>
18+
<code><span><span class="keyword">class</span> </span>
19+
<span><a href="Class_comments-class-x.html">x</a></span>
20+
<span> : <span class="keyword">object</span> ...
21+
<span class="keyword">end</span>
22+
</span>
23+
</code>
24+
</div>
25+
</div>
26+
<div class="odoc-spec">
27+
<div class="spec class anchored" id="class-c">
28+
<a href="#class-c" class="anchor"></a>
29+
<code><span><span class="keyword">class</span> 'a </span>
30+
<span><a href="Class_comments-class-c.html">c</a></span>
31+
<span> : <span class="keyword">object</span> ...
32+
<span class="keyword">end</span>
33+
</span>
34+
</code>
35+
</div>
36+
</div>
37+
</div>
38+
</body>
39+
</html>

test/generators/html/class.targets

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ Class-class-type-empty_virtual.html
88
Class-class-empty_virtual'.html
99
Class-class-type-polymorphic.html
1010
Class-class-polymorphic'.html
11-
Class-class-x.html
12-
Class-class-c.html
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Class_comments.html
2+
Class_comments-class-x.html
3+
Class_comments-class-c.html

test/generators/latex/Class.c.tex

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)