build: reformat repo to new clang@1.4.0 (#36613)

PR Close #36613
This commit is contained in:
Joey Perrott
2020-04-13 16:40:21 -07:00
committed by atscott
parent 5e80e7e216
commit 698b0288be
1160 changed files with 31667 additions and 24000 deletions

View File

@ -13,7 +13,7 @@ import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
describe('change detection benchmark', () => {
afterEach(verifyNoBrowserErrors);
it(`should render and update`, async() => {
it(`should render and update`, async () => {
openBrowser({
url: '',
ignoreBrowserSynchronization: true,

View File

@ -31,15 +31,14 @@ const UpdateWorker: Worker = {
// name. We determine the name of the Bazel package where this test runs from the current test
// target. The Bazel target
// looks like: "//modules/benchmarks/src/change_detection/{pkg_name}:{target_name}".
const testPackageName = process.env['BAZEL_TARGET'] !.split(':')[0].split('/').pop();
const testPackageName = process.env['BAZEL_TARGET']!.split(':')[0].split('/').pop();
describe('change detection benchmark perf', () => {
afterEach(verifyNoBrowserErrors);
[UpdateWorker].forEach((worker) => {
describe(worker.id, () => {
it(`should run benchmark for ${testPackageName}`, async() => {
it(`should run benchmark for ${testPackageName}`, async () => {
await runChangeDetectionBenchmark({
id: `change_detection.${testPackageName}.${worker.id}`,
url: '/',

View File

@ -35,7 +35,9 @@ export function init(moduleRef: NgModuleRef<TransplantedViewsModule>) {
appRef.tick();
}
function detectChanges() { appRef.tick(); }
function detectChanges() {
appRef.tick();
}
function noop() {}
}

View File

@ -40,10 +40,14 @@ export class InsertionComponent {
@Input() template !: TemplateRef<{}>;
views: any[] = [];
@Input()
set viewCount(n: number) { this.views = n > 0 ? newArray<any>(n) : []; }
set viewCount(n: number) {
this.views = n > 0 ? newArray<any>(n) : [];
}
// use trackBy to ensure profile isn't affected by the cost to refresh ngFor.
trackByIndex(index: number, item: any) { return index; }
trackByIndex(index: number, item: any) {
return index;
}
}
@NgModule({

View File

@ -15,7 +15,7 @@ export function newArray<T>(size: number, value: T): T[];
export function newArray<T>(size: number, value?: T): T[] {
const list: T[] = [];
for (let i = 0; i < size; i++) {
list.push(value !);
list.push(value!);
}
return list;
}