Debian Codegraph @

policy/testdata/unnest/tests.yaml

raw symbols SCIP
1 # Copyright 2024 Google LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 description: "Unnest tests unnesting of comprehension sequences"
16 section:
17 - name: "divisible by 2"
18 tests:
19 - name: "true"
20 input:
21 values:
22 expr: "[4, 6]"
23 output:
24 value: "some divisible by 2"
25 - name: "false"
26 input:
27 values:
28 expr: "[1, 3, 5]"
29 output:
30 expr: "optional.none()"
31 - name: "empty-set"
32 input:
33 values:
34 expr: "[1, 2]"
35 output:
36 expr: "optional.none()"
37 - name: "divisible by 4"
38 tests:
39 - name: "true"
40 input:
41 values:
42 expr: "[4, 7]"
43 output:
44 value: "at least one divisible by 4"
45 - name: "power of 6"
46 tests:
47 - name: "true"
48 input:
49 values:
50 expr: "[6, 7]"
51 output:
52 value: "at least one power of 6"