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

Side by Side Diff: tests/lib/profiler/metrics_test.dart

Issue 432183003: Fix dart2js int double test failure (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months 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) 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 5
6 import 'dart:profiler'; 6 import 'dart:profiler';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 testGauge1() { 9 testGauge1() {
10 var gauge = new Gauge('test', 'alpha bravo', 0.0, 100.0); 10 var gauge = new Gauge('test', 'alpha bravo', 0.0, 100.0);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 Expect.throws(() { 49 Expect.throws(() {
50 // min is not a double 50 // min is not a double
51 gauge = new Gauge('test', 'alpha bravo', 'string', 1.0); 51 gauge = new Gauge('test', 'alpha bravo', 'string', 1.0);
52 }); 52 });
53 53
54 Expect.throws(() { 54 Expect.throws(() {
55 // max is null 55 // max is null
56 gauge = new Gauge('test', 'alpha bravo', 1.0, null); 56 gauge = new Gauge('test', 'alpha bravo', 1.0, null);
57 }); 57 });
58
59 Expect.throws(() {
60 // max is not a double
61 gauge = new Gauge('test', 'alpha bravo', 1.0, 4);
62 });
63 } 58 }
64 59
65 testCounter() { 60 testCounter() {
66 var counter = new Counter('test', 'alpha bravo'); 61 var counter = new Counter('test', 'alpha bravo');
67 Expect.equals(0.0, counter.value); 62 Expect.equals(0.0, counter.value);
68 Expect.equals('test', counter.name); 63 Expect.equals('test', counter.name);
69 Expect.equals('alpha bravo', counter.description); 64 Expect.equals('alpha bravo', counter.description);
70 counter.value = 1.0; 65 counter.value = 1.0;
71 Expect.equals(1.0, counter.value); 66 Expect.equals(1.0, counter.value);
72 } 67 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 102 }
108 103
109 main() { 104 main() {
110 testGauge1(); 105 testGauge1();
111 testGauge2(); 106 testGauge2();
112 testCounter(); 107 testCounter();
113 testCustomCounter(); 108 testCustomCounter();
114 testMetricNameCollision(); 109 testMetricNameCollision();
115 testBadName(); 110 testBadName();
116 } 111 }
OLDNEW
« tests/lib/profiler/metrics_num_test.dart ('K') | « tests/lib/profiler/metrics_num_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698