From c8d239a7685ce8c81d37fd4c2eb2ea597df1ab4e Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Sun, 14 Jan 2024 18:00:41 -0500 Subject: [PATCH] add tests for undocumented symbols (#52723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following #52413 by @jariji and the discussion in #51174, this adds tests to ensure that there are no undocumented *(= lacking docstrings)* public symbols in any documented module. Many of the tests are broken — we have a lot of undocumented exports. In such cases I added both a `@test_broken` and a `@test` to ensure that there are no additional regressions added in the future. ~~(This PR may have to be updated when https://github.com/JuliaLang/julia/pull/52413#discussion_r1441068405 is fixed, i.e. when ~~#52727~~ #52743 is merged.)~~ Has been updated. --------- Co-authored-by: Lilith Orion Hafner --- test/runtests.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 7f1bbb6..84dffaf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -324,3 +324,7 @@ end @test SharedMatrix([0.1 0.2; 0.3 0.4]) == [0.1 0.2; 0.3 0.4] @test_throws MethodError SharedVector(rand(4,4)) @test_throws MethodError SharedMatrix(rand(4)) + +@testset "Docstrings" begin + @test isempty(Docs.undocumented_names(SharedArrays)) +end