Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

add test for internal doc

+39
+10
compiler-core/src/erlang/tests/documentation.rs
··· 79 79 pub fn main() { 1 }"# 80 80 ); 81 81 } 82 + 83 + #[test] 84 + fn internal_function_has_no_documentation() { 85 + assert_erl!( 86 + r#" 87 + /// hidden! 88 + @internal 89 + pub fn main() { 1 }"# 90 + ); 91 + }
+29
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__documentation__internal_function_has_no_documentation.snap
··· 1 + --- 2 + source: compiler-core/src/erlang/tests/documentation.rs 3 + expression: "\n/// hidden!\n@internal\npub fn main() { 1 }" 4 + --- 5 + ----- SOURCE CODE 6 + 7 + /// hidden! 8 + @internal 9 + pub fn main() { 1 } 10 + 11 + ----- COMPILED ERLANG 12 + -module(my@mod). 13 + -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 14 + 15 + -export([main/0]). 16 + 17 + -if(?OTP_RELEASE >= 27). 18 + -define(MODULEDOC(Str), -moduledoc(Str)). 19 + -define(DOC(Str), -doc(Str)). 20 + -else. 21 + -define(MODULEDOC(Str), -compile([])). 22 + -define(DOC(Str), -compile([])). 23 + -endif. 24 + 25 + -file("/root/project/test/my/mod.gleam", 4). 26 + ?DOC(false). 27 + -spec main() -> integer(). 28 + main() -> 29 + 1.