| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:io' as io; | 5 import 'dart:io' as io; |
| 6 | 6 |
| 7 import '../lib/shared_messages.dart'; | 7 import 'package:dart_messages/shared_messages.dart'; |
| 8 | 8 |
| 9 void testJsonIsUpdated() { | 9 void testJsonIsUpdated() { |
| 10 var packageRoot = io.Platform.packageRoot; | 10 var packageRoot = io.Platform.packageRoot; |
| 11 if (packageRoot == null || packageRoot == "") { | 11 if (packageRoot == null || packageRoot == "") { |
| 12 throw new UnsupportedError("This test requires a package root."); | 12 throw new UnsupportedError("This test requires a package root."); |
| 13 } | 13 } |
| 14 var jsonUri = Uri | 14 var jsonUri = Uri |
| 15 .parse(packageRoot) | 15 .parse(packageRoot) |
| 16 .resolve('dart_messages/generated/shared_messages.json'); | 16 .resolve('dart_messages/generated/shared_messages.json'); |
| 17 var jsonPath = jsonUri.toFilePath(); | 17 var jsonPath = jsonUri.toFilePath(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 48 throw "Specialization doesn't have same id: $id - $genericId"; | 48 throw "Specialization doesn't have same id: $id - $genericId"; |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 | 52 |
| 53 void main() { | 53 void main() { |
| 54 testJsonIsUpdated(); | 54 testJsonIsUpdated(); |
| 55 testIdsAreUnique(); | 55 testIdsAreUnique(); |
| 56 testSpecializationsAreOfSameId(); | 56 testSpecializationsAreOfSameId(); |
| 57 } | 57 } |
| OLD | NEW |