diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-03-13 08:47:37 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-03-13 08:47:37 +0000 |
commit | 75c18d52ef575b983496df8bf43a0814c5ac2fb5 (patch) | |
tree | 4b10dab576f88a73cb9178b02792b51d04b22267 /config-model/src/test/derived/declstruct | |
parent | b6277402605a1bf57b77ef0753eaa9a9db02cbe6 (diff) |
test new-style config similar to inheritdiamond
Diffstat (limited to 'config-model/src/test/derived/declstruct')
5 files changed, 121 insertions, 0 deletions
diff --git a/config-model/src/test/derived/declstruct/bar.sd b/config-model/src/test/derived/declstruct/bar.sd new file mode 100644 index 00000000000..7f7d06d5af7 --- /dev/null +++ b/config-model/src/test/derived/declstruct/bar.sd @@ -0,0 +1,8 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search bar { + document bar inherits common { + struct mystructinbar { + field f2 type string { } + } + } +} diff --git a/config-model/src/test/derived/declstruct/common.sd b/config-model/src/test/derived/declstruct/common.sd new file mode 100644 index 00000000000..dc691fb4ac7 --- /dev/null +++ b/config-model/src/test/derived/declstruct/common.sd @@ -0,0 +1,8 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search common { + document common { + struct mystruct { + field f0 type string { } + } + } +} diff --git a/config-model/src/test/derived/declstruct/documentmanager.cfg b/config-model/src/test/derived/declstruct/documentmanager.cfg new file mode 100644 index 00000000000..d9c48ddc42f --- /dev/null +++ b/config-model/src/test/derived/declstruct/documentmanager.cfg @@ -0,0 +1,89 @@ +enablecompression false +usev8geopositions false +doctype[0].name "document" +doctype[0].idx 10000 +doctype[0].contentstruct 10001 +doctype[0].primitivetype[0].idx 10002 +doctype[0].primitivetype[0].name "bool" +doctype[0].primitivetype[1].idx 10003 +doctype[0].primitivetype[1].name "byte" +doctype[0].primitivetype[2].idx 10004 +doctype[0].primitivetype[2].name "double" +doctype[0].primitivetype[3].idx 10005 +doctype[0].primitivetype[3].name "float" +doctype[0].primitivetype[4].idx 10006 +doctype[0].primitivetype[4].name "float16" +doctype[0].primitivetype[5].idx 10007 +doctype[0].primitivetype[5].name "int" +doctype[0].primitivetype[6].idx 10008 +doctype[0].primitivetype[6].name "long" +doctype[0].primitivetype[7].idx 10010 +doctype[0].primitivetype[7].name "predicate" +doctype[0].primitivetype[8].idx 10011 +doctype[0].primitivetype[8].name "raw" +doctype[0].primitivetype[9].idx 10012 +doctype[0].primitivetype[9].name "string" +doctype[0].primitivetype[10].idx 10014 +doctype[0].primitivetype[10].name "uri" +doctype[0].wsettype[0].idx 10013 +doctype[0].wsettype[0].elementtype 10012 +doctype[0].wsettype[0].createifnonexistent true +doctype[0].wsettype[0].removeifzero true +doctype[0].structtype[0].idx 10001 +doctype[0].structtype[0].name "document.header" +doctype[0].structtype[1].idx 10009 +doctype[0].structtype[1].name "position" +doctype[0].structtype[1].field[0].name "x" +doctype[0].structtype[1].field[0].internalid 914677694 +doctype[0].structtype[1].field[0].type 10007 +doctype[0].structtype[1].field[1].name "y" +doctype[0].structtype[1].field[1].internalid 900009410 +doctype[0].structtype[1].field[1].type 10007 +doctype[1].name "common" +doctype[1].idx 10015 +doctype[1].inherits[0].idx 10000 +doctype[1].contentstruct 10016 +doctype[1].structtype[0].idx 10016 +doctype[1].structtype[0].name "common.header" +doctype[1].structtype[1].idx 10017 +doctype[1].structtype[1].name "mystruct" +doctype[1].structtype[1].field[0].name "f0" +doctype[1].structtype[1].field[0].internalid 111558427 +doctype[1].structtype[1].field[0].type 10012 +doctype[2].name "foo" +doctype[2].idx 10018 +doctype[2].inherits[0].idx 10000 +doctype[2].inherits[1].idx 10015 +doctype[2].contentstruct 10019 +doctype[2].structtype[0].idx 10019 +doctype[2].structtype[0].name "foo.header" +doctype[2].structtype[1].idx 10020 +doctype[2].structtype[1].name "mystructinfoo" +doctype[2].structtype[1].field[0].name "f1" +doctype[2].structtype[1].field[0].internalid 1911889118 +doctype[2].structtype[1].field[0].type 10012 +doctype[3].name "bar" +doctype[3].idx 10021 +doctype[3].inherits[0].idx 10000 +doctype[3].inherits[1].idx 10015 +doctype[3].contentstruct 10022 +doctype[3].structtype[0].idx 10022 +doctype[3].structtype[0].name "bar.header" +doctype[3].structtype[1].idx 10023 +doctype[3].structtype[1].name "mystructinbar" +doctype[3].structtype[1].field[0].name "f2" +doctype[3].structtype[1].field[0].internalid 84639357 +doctype[3].structtype[1].field[0].type 10012 +doctype[4].name "foobar" +doctype[4].idx 10024 +doctype[4].inherits[0].idx 10000 +doctype[4].inherits[1].idx 10018 +doctype[4].inherits[2].idx 10021 +doctype[4].contentstruct 10025 +doctype[4].structtype[0].idx 10025 +doctype[4].structtype[0].name "foobar.header" +doctype[4].structtype[1].idx 10026 +doctype[4].structtype[1].name "mystructinfoobar" +doctype[4].structtype[1].field[0].name "f3" +doctype[4].structtype[1].field[0].internalid 63940691 +doctype[4].structtype[1].field[0].type 10012 diff --git a/config-model/src/test/derived/declstruct/foo.sd b/config-model/src/test/derived/declstruct/foo.sd new file mode 100644 index 00000000000..6470671f437 --- /dev/null +++ b/config-model/src/test/derived/declstruct/foo.sd @@ -0,0 +1,8 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search foo { + document foo inherits common { + struct mystructinfoo { + field f1 type string { } + } + } +} diff --git a/config-model/src/test/derived/declstruct/foobar.sd b/config-model/src/test/derived/declstruct/foobar.sd new file mode 100644 index 00000000000..cc05444249b --- /dev/null +++ b/config-model/src/test/derived/declstruct/foobar.sd @@ -0,0 +1,8 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search foobar { + document foobar inherits foo, bar { + struct mystructinfoobar { + field f3 type string { } + } + } +} |