OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library usage.uuid_test; | 5 library usage.uuid_test; |
6 | 6 |
7 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
8 import 'package:usage/src/uuid.dart'; | 8 import 'package:usage/uuid/uuid.dart'; |
9 | 9 |
10 main() => defineTests(); | 10 main() => defineTests(); |
11 | 11 |
12 void defineTests() { | 12 void defineTests() { |
13 group('uuid', () { | 13 group('uuid', () { |
14 // xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx | 14 // xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx |
15 test('simple', () { | 15 test('simple', () { |
16 Uuid uuid = new Uuid(); | 16 Uuid uuid = new Uuid(); |
17 String result = uuid.generateV4(); | 17 String result = uuid.generateV4(); |
18 expect(result.length, 36); | 18 expect(result.length, 36); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 uuid = new Uuid(); | 65 uuid = new Uuid(); |
66 for (int i = 0; i < 64; i++) { | 66 for (int i = 0; i < 64; i++) { |
67 String val = uuid.generateV4(); | 67 String val = uuid.generateV4(); |
68 expect(set, isNot(contains(val))); | 68 expect(set, isNot(contains(val))); |
69 set.add(val); | 69 set.add(val); |
70 } | 70 } |
71 }); | 71 }); |
72 }); | 72 }); |
73 } | 73 } |
OLD | NEW |