• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
1412
157.3
160,0
171,1
182,undefined
193,undefined
204,undefined
215,5
226,6
23array[5]5
240,0
251,1
262,undefined
273,undefined
284,undefined
295,undefined
306,6
31undefined
325
331
34spray
354
36Find Test case 1:
37Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"array":[1,2,3,4]}] Result: 3
38---
39Find Test case 2:
40Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"array":[1,2,3,4]},{"value":4,"index":3,"array":[1,2,3,4]}] Result: undefined
41---
42Find Test case 3:
43Log: [] Result: undefined
44---
45Find Test case 4:
46Log: [{"value":false,"index":0,"array":[false,0,""]}] Result: false
47---
48Find Test case 5:
49Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"array":[1,2,3,4]}] Result: 3
50---
51Find Test case 6:
52Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result: 1
53---
54Find Test case 7:
55Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index":2,"array":[1,2,3,4]}] Result: 3
56---
57Find Test case 8:
58Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result: 1
59---
60Find Test case 9:
61Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index":2,"array":[1,2,3]}] Result: undefined
62---
63Find Test case 10:
64Log: [{"value":1,"index":0,"array":[1,2,3]}] Result: 1
65---
66Find Test case 11:
67Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"array":[1,2,3,4]}] Result: 3
68---
69Find Test case 12:
70Log: [{"value":{"id":1},"index":0,"array":[{"id":1},{"id":2}]},{"value":{"id":2},"index":1,"array":[{"id":1},{"id":2}]}] Result: {"id":2}
71---
72Find Test case 13:
73Log: [{"value":{"x":2},"index":0,"array":[{"x":2},{"x":2}]}] Result: {"x":2}
74---
75Find Test case 14:
76Log: [] Result: undefined
77---
78Find Test case 15:
79Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index":2,"array":[1,4,3]}] Result: undefined
80---
81