Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 129) sorted by relevance

123456

/development/vndk/tools/sourcedr/blueprint/tests/
Dtest_parser.py32 parser = Parser(None)
35 parser.define_var('a', str1)
36 self.assertEqual(len(parser.var_defs), 1)
37 self.assertEqual(len(parser.vars), 1)
38 self.assertIn('a', parser.vars)
39 self.assertIs(parser.vars['a'], str1)
42 parser.define_var('a', str2)
43 self.assertEqual(len(parser.var_defs), 2)
44 self.assertEqual(len(parser.vars), 1)
45 self.assertIn('a', parser.vars)
[all …]
/development/samples/training/network-usage/src/com/example/android/networkusage/
DStackOverflowXmlParser.java39 XmlPullParser parser = Xml.newPullParser(); in parse() local
40 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
41 parser.setInput(in, null); in parse()
42 parser.nextTag(); in parse()
43 return readFeed(parser); in parse()
49 private List<Entry> readFeed(XmlPullParser parser) throws XmlPullParserException, IOException { in readFeed() argument
52 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
53 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
54 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
57 String name = parser.getName(); in readFeed()
[all …]
/development/samples/browseable/BasicSyncAdapter/src/com.example.android.basicsyncadapter/net/
DFeedParser.java61 XmlPullParser parser = Xml.newPullParser(); in parse() local
62 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in parse()
63 parser.setInput(in, null); in parse()
64 parser.nextTag(); in parse()
65 return readFeed(parser); in parse()
79 private List<Entry> readFeed(XmlPullParser parser) in readFeed() argument
90 parser.require(XmlPullParser.START_TAG, ns, "feed"); in readFeed()
91 while (parser.next() != XmlPullParser.END_TAG) { in readFeed()
92 if (parser.getEventType() != XmlPullParser.START_TAG) { in readFeed()
95 String name = parser.getName(); in readFeed()
[all …]
/development/vndk/tools/header-checker/src/repr/symbol/
Dversion_script_parser_test.cpp50 VersionScriptParser parser; in TEST() local
53 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
83 VersionScriptParser parser; in TEST() local
86 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
97 VersionScriptParser parser; in TEST() local
98 parser.AddExcludedSymbolVersion("*_PRIVATE"); in TEST()
101 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
137 VersionScriptParser parser; in TEST() local
140 std::unique_ptr<ExportedSymbolSet> result(parser.Parse(stream)); in TEST()
168 VersionScriptParser parser; in TEST() local
[all …]
/development/tools/winscope/src/app/
Dloaded_parsers.ts82 return fileAndParsers.map((fileAndParser) => fileAndParser.parser);
85 remove(parser: Parser<object>) {
87 (fileAndParser) => fileAndParser.parser !== parser,
90 (fileAndParser) => fileAndParser.parser !== parser,
148 this.legacyParsers.forEach(({file, parser}) => {
149 const traceType = parser.getTraceType();
210 const {parser} = fileAndParser; constant
213 parser,
218 legacyParsersBeingLoaded.set(parser.getTraceType(), parser);
232 parsers.forEach((parser) => {
[all …]
/development/tools/winscope/src/parsers/legacy/
Dparser_common_test.ts43 const parser = await UnitTestUtils.getParser( constant
47 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_CLIENTS);
48 expect(parser.getTimestamps()).toEqual([]);
52 let parser: Parser<HierarchyTreeNode>; variable
55 parser = (await UnitTestUtils.getParser(
66 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(
72 let entry = await parser.getEntry(0);
77 entry = await parser.getEntry(parser.getLengthEntries() - 1);
85 let parser: Parser<HierarchyTreeNode>; variable
88 parser = (await UnitTestUtils.getParser(
[all …]
/development/tools/winscope/src/parsers/input_method/legacy/
Dparser_input_method_manager_service_test.ts26 let parser: Parser<HierarchyTreeNode>; variable
30 parser = (await UnitTestUtils.getParser(
36 expect(parser.getTraceType()).toEqual(
41 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
45 expect(parser.getTimestamps()).toEqual([
51 const entry = await parser.getEntry(0);
58 let parser: Parser<HierarchyTreeNode>; variable
61 parser = (await UnitTestUtils.getParser(
67 expect(parser.getTraceType()).toEqual(
73 expect(assertDefined(parser.getTimestamps())[0]).toEqual(
[all …]
Dparser_input_method_service_test.ts26 let parser: Parser<HierarchyTreeNode>; variable
30 parser = (await UnitTestUtils.getParser(
36 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_SERVICE);
40 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
47 expect(parser.getTimestamps()).toEqual(expected);
51 const entry = await parser.getEntry(0);
58 let parser: Parser<HierarchyTreeNode>; variable
61 parser = (await UnitTestUtils.getParser(
67 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_SERVICE);
71 expect(assertDefined(parser.getTimestamps())[0]).toEqual(
[all …]
Dparser_input_method_clients_test.ts27 let parser: Parser<HierarchyTreeNode>; variable
31 parser = (await UnitTestUtils.getParser(
37 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_CLIENTS);
41 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
50 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(
56 const entry = await parser.getEntry(1);
63 let parser: Parser<HierarchyTreeNode>; variable
67 parser = (await UnitTestUtils.getParser(
73 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_CLIENTS);
77 expect(assertDefined(parser.getTimestamps())[0]).toEqual(
[all …]
/development/tools/winscope/src/parsers/surface_flinger/legacy/
Dparser_surface_flinger_dump_test.ts30 let parser: Parser<HierarchyTreeNode>; variable
33 parser = (await UnitTestUtils.getParser(
39 expect(parser.getTraceType()).toEqual(TraceType.SURFACE_FLINGER);
43 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
48 expect(parser.getTimestamps()).toEqual(expected);
62 const entry = await parser.getEntry(0);
68 let parser: Parser<HierarchyTreeNode>; variable
71 parser = (await UnitTestUtils.getParser(
77 expect(parser.getTraceType()).toEqual(TraceType.SURFACE_FLINGER);
81 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
[all …]
Dparser_surface_flinger_test.ts30 let parser: Parser<HierarchyTreeNode>; variable
35 parser = (await UnitTestUtils.getParser(
40 .setParser(parser)
45 expect(parser.getTraceType()).toEqual(TraceType.SURFACE_FLINGER);
49 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
58 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(
64 const entry = await parser.getEntry(1);
70 const entry = await parser.getEntry(0);
140 const parser = (await UnitTestUtils.getParser( constant
143 const entry = await parser.getEntry(0);
[all …]
/development/vndk/snapshot/
Dmulti_update.py43 def get_args(parser): argument
44 parser.add_argument(
50 parser.add_argument(
54 parser.add_argument(
58 parser.add_argument(
63 parser.add_argument(
69 return parser.parse_args()
72 parser = argparse.ArgumentParser()
73 args = get_args(parser)
82 parser.print_help()
/development/tools/winscope/src/parsers/window_manager/
Dparser_window_manager_test.ts29 let parser: Parser<HierarchyTreeNode>; variable
34 parser = (await UnitTestUtils.getParser(
39 .setParser(parser)
44 expect(parser.getTraceType()).toEqual(TraceType.WINDOW_MANAGER);
48 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
57 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(
63 const entry = await parser.getEntry(1);
78 let parser: Parser<HierarchyTreeNode>; variable
81 parser = (await UnitTestUtils.getParser(
87 expect(parser.getTraceType()).toEqual(TraceType.WINDOW_MANAGER);
[all …]
Dparser_window_manager_dump_test.ts28 let parser: Parser<HierarchyTreeNode>; variable
33 parser = (await UnitTestUtils.getParser(
38 .setParser(parser)
43 expect(parser.getTraceType()).toEqual(TraceType.WINDOW_MANAGER);
47 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
52 expect(parser.getTimestamps()).toEqual(expected);
64 expect(parser.getTimestamps()).toEqual([
70 const entry = await parser.getEntry(0);
/development/tools/winscope/src/parsers/transactions/legacy/
Dparser_transactions_test.ts28 let parser: Parser<PropertyTreeNode>; variable
32 parser = (await UnitTestUtils.getParser(
38 expect(parser.getTraceType()).toEqual(TraceType.TRANSACTIONS);
42 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
46 const timestamps = assertDefined(parser.getTimestamps());
59 const entry = await parser.getEntry(1);
65 const entry = await parser.getEntry(0);
89 const entry = await parser.getEntry(222);
110 .setParser(parser)
121 let parser: Parser<PropertyTreeNode>; variable
[all …]
/development/tools/winscope/src/parsers/screen_recording/
Dparser_screenshot_test.ts28 let parser: ParserScreenshot; variable
34 parser = new ParserScreenshot(
38 await parser.parse();
39 parser.createTimestamps();
43 expect(parser.getTraceType()).toEqual(TraceType.SCREENSHOT);
47 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
51 const timestamps = assertDefined(parser.getTimestamps());
65 assertDefined(parser.getTimestamps()).forEach((timestamp) =>
71 const entry = await parser.getEntry(0);
Dparser_screen_recording_test.ts25 let parser: Parser<ScreenRecordingTraceEntry>; variable
29 parser = (await UnitTestUtils.getParser(
35 expect(parser.getTraceType()).toEqual(TraceType.SCREEN_RECORDING);
39 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
43 const timestamps = assertDefined(parser.getTimestamps());
57 const entry = await parser.getEntry(0);
62 const entry = await parser.getEntry(parser.getLengthEntries() - 1);
Dparser_screen_recording_legacy_test.ts26 let parser: Parser<ScreenRecordingTraceEntry>; variable
29 parser = (await UnitTestUtils.getParser(
35 expect(parser.getTraceType()).toEqual(TraceType.SCREEN_RECORDING);
39 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
43 const timestamps = assertDefined(parser.getTimestamps());
66 const entry = await parser.getEntry(0);
71 const entry = await parser.getEntry(parser.getLengthEntries() - 1);
/development/tools/winscope/src/parsers/input_method/perfetto/
Dparser_input_method_clients_test.ts25 let parser: Parser<HierarchyTreeNode>; variable
29 parser = (await UnitTestUtils.getPerfettoParser(
36 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_CLIENTS);
40 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
44 expect(assertDefined(parser.getTimestamps()).length).toEqual(56);
51 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(expected);
55 const entry = await parser.getEntry(1);
61 const entry = await parser.getEntry(7);
Dparser_input_method_service_test.ts25 let parser: Parser<HierarchyTreeNode>; variable
29 parser = (await UnitTestUtils.getPerfettoParser(
36 expect(parser.getTraceType()).toEqual(TraceType.INPUT_METHOD_SERVICE);
40 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
44 expect(assertDefined(parser.getTimestamps()).length).toEqual(18);
51 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(expected);
55 const entry = await parser.getEntry(0);
Dparser_input_method_manager_service_test.ts25 let parser: Parser<HierarchyTreeNode>; variable
29 parser = (await UnitTestUtils.getPerfettoParser(
36 expect(parser.getTraceType()).toEqual(
42 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
46 expect(assertDefined(parser.getTimestamps()).length).toEqual(7);
53 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(expected);
57 const entry = await parser.getEntry(0);
/development/tools/winscope/src/parsers/events/
Dparser_eventlog_test.ts29 let parser: Parser<PropertyTreeNode>; variable
33 parser = assertDefined(
39 expect(parser.getTraceType()).toEqual(TraceType.EVENT_LOG);
43 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LEGACY);
47 const timestamps = assertDefined(parser.getTimestamps());
60 const entry = await parser.getEntry(18);
84 let parser: Parser<PropertyTreeNode>; variable
88 parser = assertDefined(
96 const timestamps = assertDefined(parser.getTimestamps());
109 const entry = await parser.getEntry(0);
/development/tools/winscope/src/test/unit/
Dutils.ts104 fileAndParser.parser.getRealToMonotonicTimeOffsetNs() !== undefined,
106 ?.parser.getRealToMonotonicTimeOffsetNs();
113 fileAndParser.parser.getRealToBootTimeOffsetNs() !== undefined,
115 ?.parser.getRealToBootTimeOffsetNs();
122 fileAndParser.parser.createTimestamps();
123 return fileAndParser.parser;
142 const parser = assertDefined( constant
143 parsers.find((parser) => parser.getTraceType() === traceType),
145 return parser as Parser<TraceEntryTypeMap[T]>;
160 parsers.forEach((parser) => {
[all …]
/development/tools/winscope/src/parsers/view_capture/perfetto/
Dparser_view_capture_window_test.ts27 let parser: Parser<HierarchyTreeNode>; variable
32 parser = (await UnitTestUtils.getPerfettoParser(
36 trace = Trace.fromParser(parser);
40 expect(parser.getTraceType()).toEqual(TraceType.VIEW_CAPTURE);
44 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
48 expect(assertDefined(parser.getTimestamps()).length).toEqual(36);
55 expect(assertDefined(parser.getTimestamps()).slice(0, 3)).toEqual(expected);
59 const root = await parser.getEntry(1);
73 const root = await parser.getEntry(1);
/development/tools/winscope/src/parsers/transactions/perfetto/
Dparser_transactions_test.ts27 let parser: Parser<PropertyTreeNode>; variable
31 parser = await UnitTestUtils.getPerfettoParser(
38 expect(parser.getTraceType()).toEqual(TraceType.TRANSACTIONS);
42 expect(parser.getCoarseVersion()).toEqual(CoarseVersion.LATEST);
46 const timestamps = assertDefined(parser.getTimestamps());
59 const entry = await parser.getEntry(1);
64 const entry0 = await parser.getEntry(0);
65 const entry2 = await parser.getEntry(2);
125 const entry = await parser.getEntry(0);
146 const entry = await parser.getEntry(222);
[all …]

123456