OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:convert'; | 6 import 'dart:convert'; |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 import 'dart:typed_data'; | 8 import 'dart:typed_data'; |
9 import 'dart:mojo.bindings'; | 9 import 'dart:mojo.bindings'; |
10 import 'dart:mojo.builtin' as builtin; | 10 import 'dart:mojo.builtin' as builtin; |
(...skipping 18 matching lines...) Expand all Loading... |
29 method2(StructB param0, StructA param1) => _complete(); | 29 method2(StructB param0, StructA param1) => _complete(); |
30 method3(List<bool> param0) => _complete(); | 30 method3(List<bool> param0) => _complete(); |
31 method4(StructC param0, List<int> param1) => _complete(); | 31 method4(StructC param0, List<int> param1) => _complete(); |
32 method5(StructE param0, MojoDataPipeProducer param1) => _complete(); | 32 method5(StructE param0, MojoDataPipeProducer param1) => _complete(); |
33 method6(List<List<int>> param0) => _complete(); | 33 method6(List<List<int>> param0) => _complete(); |
34 method7(StructF param0, List<List<int>> param1) => _complete(); | 34 method7(StructF param0, List<List<int>> param1) => _complete(); |
35 method8(List<List<String>> param0) => _complete(); | 35 method8(List<List<String>> param0) => _complete(); |
36 method9(List<List<MojoHandle>> param0) => _complete(); | 36 method9(List<List<MojoHandle>> param0) => _complete(); |
37 method10(Map<String, int> param0) => _complete(); | 37 method10(Map<String, int> param0) => _complete(); |
38 | 38 |
39 void close({bool nodefer: false}) => _stub.close(nodefer: nodefer); | 39 Future close({bool nodefer: false}) => _stub.close(nodefer: nodefer); |
40 } | 40 } |
41 | 41 |
42 parser.ValidationParseResult readAndParseTest(String test) { | 42 parser.ValidationParseResult readAndParseTest(String test) { |
43 List<int> data = builtin.readSync("${test}.data"); | 43 List<int> data = builtin.readSync("${test}.data"); |
44 String input = new Utf8Decoder().convert(data).trim(); | 44 String input = new Utf8Decoder().convert(data).trim(); |
45 return parser.parse(input); | 45 return parser.parse(input); |
46 } | 46 } |
47 | 47 |
48 String expectedResult(String test) { | 48 String expectedResult(String test) { |
49 List<int> data = builtin.readSync("${test}.expected"); | 49 List<int> data = builtin.readSync("${test}.expected"); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // First test the parser. | 96 // First test the parser. |
97 parser.parserTests(); | 97 parser.parserTests(); |
98 | 98 |
99 // Then run the conformance tests. | 99 // Then run the conformance tests. |
100 getTestFiles(path, "$path/conformance_").forEach((test) { | 100 getTestFiles(path, "$path/conformance_").forEach((test) { |
101 runTest(test, readAndParseTest(test), expectedResult(test)); | 101 runTest(test, readAndParseTest(test), expectedResult(test)); |
102 }); | 102 }); |
103 // TODO(zra): Add integration tests when they no longer rely on Client=. | 103 // TODO(zra): Add integration tests when they no longer rely on Client=. |
104 } | 104 } |
OLD | NEW |