| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Dart test program for testing native extensions. | 5 // Dart test program for testing native extensions. |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 import "package:path/path.dart"; | 8 import "package:path/path.dart"; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return join(buildDirectory, filename); | 49 return join(buildDirectory, filename); |
| 50 default: | 50 default: |
| 51 Expect.fail('Unknown operating system ${Platform.operatingSystem}'); | 51 Expect.fail('Unknown operating system ${Platform.operatingSystem}'); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 String getArchFromBuildDir(String buildDirectory) { | 55 String getArchFromBuildDir(String buildDirectory) { |
| 56 if (buildDirectory.endsWith('SIMARM')) return ''; | 56 if (buildDirectory.endsWith('SIMARM')) return ''; |
| 57 if (buildDirectory.endsWith('SIMARM64')) return ''; | 57 if (buildDirectory.endsWith('SIMARM64')) return ''; |
| 58 if (buildDirectory.endsWith('SIMDBC')) return ''; | 58 if (buildDirectory.endsWith('SIMDBC')) return ''; |
| 59 if (buildDirectory.endsWith('SIMDBC64')) return ''; |
| 59 if (buildDirectory.endsWith('SIMMIPS')) return ''; | 60 if (buildDirectory.endsWith('SIMMIPS')) return ''; |
| 60 if (buildDirectory.endsWith('ARM')) return '-arm'; | 61 if (buildDirectory.endsWith('ARM')) return '-arm'; |
| 61 if (buildDirectory.endsWith('ARM64')) return '-arm64'; | 62 if (buildDirectory.endsWith('ARM64')) return '-arm64'; |
| 62 if (buildDirectory.endsWith('IA32')) return '-ia32'; | 63 if (buildDirectory.endsWith('IA32')) return '-ia32'; |
| 63 if (buildDirectory.endsWith('MIPS')) return '-mips'; | 64 if (buildDirectory.endsWith('MIPS')) return '-mips'; |
| 64 if (buildDirectory.endsWith('X64')) return '-x64'; | 65 if (buildDirectory.endsWith('X64')) return '-x64'; |
| 65 return 'unknown'; | 66 return 'unknown'; |
| 66 } | 67 } |
| 67 | 68 |
| 68 Future testExtension(bool withArchSuffix) { | 69 Future testExtension(bool withArchSuffix) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 114 } |
| 114 | 115 |
| 115 Future testWithoutArchSuffix() { | 116 Future testWithoutArchSuffix() { |
| 116 return testExtension(false); | 117 return testExtension(false); |
| 117 } | 118 } |
| 118 | 119 |
| 119 main() async { | 120 main() async { |
| 120 await testWithArchSuffix(); | 121 await testWithArchSuffix(); |
| 121 await testWithoutArchSuffix(); | 122 await testWithoutArchSuffix(); |
| 122 } | 123 } |
| OLD | NEW |