Skip to content

Commit f05ecce

Browse files
committed
test(doc-links): move JVM not_indexed fixtures to a skipped layout (DeusData#2661)
The Java and Kotlin doc-link reason tests modelled "a package in a directory discovery skips" with src/main/java/a/env/ and src/main/kotlin/k/env/. Discovery now keeps packages below src/<set>/<lang>/, so those files are indexed and the two not_indexed assertions failed. Move both fixtures to a plain src/<pkg>/ layout, which discovery still skips by name (the open part of DeusData#2661), and reword the comments. Assertions unchanged. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent d57846c commit f05ecce

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎tests/test_doc_mentions_jvm.c‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,10 @@ TEST(doc_mentions_jvm_java_families_and_reasons) {
578578
jt_write(&r, "src/main/java/b/Helper.java", JT_HELPER);
579579
jt_write(&r, "src/main/java/a/Shapes.java", JT_SHAPES);
580580
jt_write(&r, "src/main/java/a/Widget.java", JT_WIDGET);
581-
/* a real package in a directory the indexer skips by name */
582-
jt_write(&r, "src/main/java/a/env/Config.java", "package a.env;\npublic class Config {}\n");
581+
/* a real package in a layout discovery still skips by name: a plain
582+
* src/<pkg>/ tree (the open part of #2661); below src/<set>/<lang>/ the
583+
* same package is kept since #2724 */
584+
jt_write(&r, "src/a/env/Config.java", "package a.env;\npublic class Config {}\n");
583585
jt_write(&r, "src/test/java/a/GadgetTests.java",
584586
"package a;\n/** Tests {@link Gadget}. */\npublic class GadgetTests {}\n");
585587
ASSERT_EQ(dm_index(r.repo, r.db, NULL), 0);
@@ -643,8 +645,8 @@ TEST(doc_mentions_jvm_java_families_and_reasons) {
643645
ASSERT_EQ(jt_edge(db, "a.Widget", "a.GadgetTests"), 0);
644646
/* ... while test code binds product code */
645647
ASSERT_EQ(jt_edge(db, "a.GadgetTests", "a.Gadget"), 1);
646-
/* not_indexed: a package of the repository in a directory discovery
647-
* skips, named by an import and by its qualified name */
648+
/* not_indexed: a package of the repository in a layout discovery still
649+
* skips by name, named by an import and by its qualified name */
648650
ASSERT_STR_EQ(jt_reason(db, w, "Config"), "not_indexed");
649651
ASSERT_STR_EQ(jt_reason(db, w, "a.env.Other"), "not_indexed");
650652
/* graph_gap: a package (no node), a record component, an interface
@@ -1117,8 +1119,10 @@ TEST(doc_mentions_jvm_kotlin_families_and_reasons) {
11171119
jt_write(&r, "src/main/kotlin/far/Helper.kt",
11181120
"package far\n\nclass Helper {\n fun run() {}\n}\n");
11191121
jt_write(&r, "src/main/kotlin/far/sub/Deep.kt", "package far.sub\n\nclass Deep\n");
1120-
/* a real package in a directory the indexer skips by name */
1121-
jt_write(&r, "src/main/kotlin/k/env/Config.kt", "package k.env\n\nclass Config\n");
1122+
/* a real package in a layout discovery still skips by name: a plain
1123+
* src/<pkg>/ tree (the open part of #2661); below src/<set>/<lang>/ the
1124+
* same package is kept since #2724 */
1125+
jt_write(&r, "src/k/env/Config.kt", "package k.env\n\nclass Config\n");
11221126
jt_write(&r, "src/test/kotlin/k/GadgetTests.kt", "package k\n\nclass GadgetTests\n");
11231127
jt_write(&r, "src/test/kotlin/k/samples/Samples.kt",
11241128
"package k.samples\n\nfun widgetSample() {}\n");
@@ -1170,7 +1174,7 @@ TEST(doc_mentions_jvm_kotlin_families_and_reasons) {
11701174
ASSERT_STR_EQ(jt_reason(db, w, "far.sub"), "graph_gap");
11711175
/* test_only_target */
11721176
ASSERT_STR_EQ(jt_reason(db, w, "GadgetTests"), "test_only_target");
1173-
/* not_indexed: a package of the repository in a directory discovery skips */
1177+
/* not_indexed: a package of the repository in a layout discovery still skips by name */
11741178
ASSERT_STR_EQ(jt_reason(db, w, "k.env.Config"), "not_indexed");
11751179
/* unparseable: a path with an empty name in it */
11761180
ASSERT_STR_EQ(jt_reason(db, w, "Gadget..spin"), "unparseable");

0 commit comments

Comments
 (0)