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

Side by Side Diff: tracing/tracing/base/math/running_statistics_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2016 The Chromium Authors. All rights reserved. 3 Copyright (c) 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 <link rel="import" href="/tracing/base/running_statistics.html"> 7 <link rel="import" href="/tracing/base/math/running_statistics.html">
8 <link rel="import" href="/tracing/base/statistics.html"> 8 <link rel="import" href="/tracing/base/math/statistics.html">
9 <script> 9 <script>
10 'use strict'; 10 'use strict';
11 11
12 tr.b.unittest.testSuite(function() { 12 tr.b.unittest.testSuite(function() {
13 var RunningStatistics = tr.b.RunningStatistics; 13 var RunningStatistics = tr.b.math.RunningStatistics;
14 var Statistics = tr.b.Statistics; 14 var Statistics = tr.b.math.Statistics;
15 15
16 function run(data) { 16 function run(data) {
17 var running = new RunningStatistics(); 17 var running = new RunningStatistics();
18 data.forEach(x => running.add(x)); 18 data.forEach(x => running.add(x));
19 return running; 19 return running;
20 } 20 }
21 21
22 test('sum', function() { 22 test('sum', function() {
23 var data; 23 var data;
24 data = []; 24 data = [];
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 for (var field = 0; field < dict.length; ++field) { 184 for (var field = 0; field < dict.length; ++field) {
185 assert.closeTo(dict[field], cloneDict[field], 1e-6); 185 assert.closeTo(dict[field], cloneDict[field], 1e-6);
186 } 186 }
187 187
188 // You can change this number, but when you do, please explain in your CL 188 // You can change this number, but when you do, please explain in your CL
189 // description why it changed. 189 // description why it changed.
190 assert.strictEqual(32, JSON.stringify(dict).length); 190 assert.strictEqual(32, JSON.stringify(dict).length);
191 }); 191 });
192 }); 192 });
193 </script> 193 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/base/math/running_statistics.html ('k') | tracing/tracing/base/math/sorted_array_utils.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698