Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: tests/compiler/dart2js/sha1_test.dart

Issue 693183006: Revert "Move dart2js from sdk/lib/_internal/compiler to pkg/compiler" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // This test is ripped from package:crypto to test the sha1 functionality copied 5 // This test is ripped from package:crypto to test the sha1 functionality copied
6 // into the compiler. 6 // into the compiler.
7 7
8 library sha1_test; 8 library sha1_test;
9 import 'package:compiler/src/hash/sha1.dart'; 9 import 'package:compiler/implementation/hash/sha1.dart';
10 10
11 import "package:unittest/unittest.dart"; 11 import "package:unittest/unittest.dart";
12 12
13 part 'sha1_long_test_vectors.dart'; 13 part 'sha1_long_test_vectors.dart';
14 part 'sha1_short_test_vectors.dart'; 14 part 'sha1_short_test_vectors.dart';
15 15
16 16
17 void main() { 17 void main() {
18 test('expected values', _testExpectedValues); 18 test('expected values', _testExpectedValues);
19 test('invalid use', _testInvalidUse); 19 test('invalid use', _testInvalidUse);
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 } 570 }
571 571
572 void _testStandardVectors(inputs, mds) { 572 void _testStandardVectors(inputs, mds) {
573 for (var i = 0; i < inputs.length; i++) { 573 for (var i = 0; i < inputs.length; i++) {
574 var hash = new SHA1(); 574 var hash = new SHA1();
575 hash.add(inputs[i]); 575 hash.add(inputs[i]);
576 var d = hash.close(); 576 var d = hash.close();
577 expect(mds[i], bytesToHex(d), reason: '$i'); 577 expect(mds[i], bytesToHex(d), reason: '$i');
578 } 578 }
579 } 579 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/setlet_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_callers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698