aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/tests/documentselectparsertest.cpp
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-02-22 12:41:47 +0100
committerGitHub <noreply@github.com>2023-02-22 12:41:47 +0100
commit10383524e05d70e4fb975c19d1dd57b855f914a5 (patch)
treea60b817cbc7e3df20605fc934641bc5a4b2a1285 /document/src/tests/documentselectparsertest.cpp
parentda4c1f2994d98e68a8196e271cbaad3c3c09cbb7 (diff)
parentda0b9d14547e6c98b0472f1834f086a0e1efd717 (diff)
Merge pull request #26128 from vespa-engine/vekterli/fix-supertype-match-for-doc-sel-field-lookups
Fix C++ document selection regression where supertype in field expression would not match as expected
Diffstat (limited to 'document/src/tests/documentselectparsertest.cpp')
-rw-r--r--document/src/tests/documentselectparsertest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp
index ce4b69419a3..5e14a080f27 100644
--- a/document/src/tests/documentselectparsertest.cpp
+++ b/document/src/tests/documentselectparsertest.cpp
@@ -673,8 +673,9 @@ TEST_F(DocumentSelectParserTest, operators_1)
// Inherited doctypes
PARSE("testdoctype2", *_doc[4], True);
PARSE("testdoctype2", *_doc[3], False);
- PARSE("testdoctype1", *_doc[4], False); // testdoctype2 inherits testdoctype1, but we use exact matching for types
- PARSE("testdoctype1.headerval = 10", *_doc[4], Invalid);
+ PARSE("testdoctype1", *_doc[4], False); // testdoctype2 inherits testdoctype1, but we use exact matching for "standalone" doctype matches.
+ PARSE("testdoctype1.headerval = 10", *_doc[4], True); // But _field lookups_ use is-a type matching semantics.
+ PARSE("testdoctype2.headerval = 10", *_doc[4], True); // Exact type match with parent field also works transparently
}
TEST_F(DocumentSelectParserTest, operators_2)