alpha
Login
or
Join now
nandi.uk
/
gleam
Star
2
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Fork of daniellemaywood.uk/gleam — Wasm codegen work
Star
2
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
add test for internal doc
author
Giacomo Cavalieri
committer
Louis Pilfold
date
2 years ago
(Jan 8, 2025, 4:59 PM UTC)
commit
831de814
831de8149cc58ab80cd5694f276c84af9be8d08c
parent
c9e77ad7
c9e77ad7343e4f4e8d41f74f4ecb6dd4cded1f69
+39
2 changed files
Expand all
Collapse all
Unified
Split
compiler-core
src
erlang
tests
documentation.rs
snapshots
gleam_core__erlang__tests__documentation__internal_function_has_no_documentation.snap
+10
compiler-core/src/erlang/tests/documentation.rs
View file
Reviewed
···
79
79
pub fn main() { 1 }"#
80
80
);
81
81
}
82
82
+
83
83
+
#[test]
84
84
+
fn internal_function_has_no_documentation() {
85
85
+
assert_erl!(
86
86
+
r#"
87
87
+
/// hidden!
88
88
+
@internal
89
89
+
pub fn main() { 1 }"#
90
90
+
);
91
91
+
}
+29
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__documentation__internal_function_has_no_documentation.snap
View file
Reviewed
···
1
1
+
---
2
2
+
source: compiler-core/src/erlang/tests/documentation.rs
3
3
+
expression: "\n/// hidden!\n@internal\npub fn main() { 1 }"
4
4
+
---
5
5
+
----- SOURCE CODE
6
6
+
7
7
+
/// hidden!
8
8
+
@internal
9
9
+
pub fn main() { 1 }
10
10
+
11
11
+
----- COMPILED ERLANG
12
12
+
-module(my@mod).
13
13
+
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
14
14
+
15
15
+
-export([main/0]).
16
16
+
17
17
+
-if(?OTP_RELEASE >= 27).
18
18
+
-define(MODULEDOC(Str), -moduledoc(Str)).
19
19
+
-define(DOC(Str), -doc(Str)).
20
20
+
-else.
21
21
+
-define(MODULEDOC(Str), -compile([])).
22
22
+
-define(DOC(Str), -compile([])).
23
23
+
-endif.
24
24
+
25
25
+
-file("/root/project/test/my/mod.gleam", 4).
26
26
+
?DOC(false).
27
27
+
-spec main() -> integer().
28
28
+
main() ->
29
29
+
1.