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

@ -22,7 +22,9 @@ Zone.__load_patch('asynctest', (global: any, Zone: ZoneType, api: _ZonePrivate)
// if we run beforeEach in @angular/core/testing/testing_internal then we get no done
// fake it here and assume sync.
done = function() {};
done.fail = function(e: any) { throw e; };
done.fail = function(e: any) {
throw e;
};
}
runInTestZone(fn, this, done, (err: any) => {
if (typeof err === 'string') {
@ -68,7 +70,7 @@ Zone.__load_patch('asynctest', (global: any, Zone: ZoneType, api: _ZonePrivate)
// If we do it in ProxyZone then we will get to infinite recursion.
const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
const previousDelegate = proxyZoneSpec.getDelegate();
proxyZone !.parent !.run(() => {
proxyZone!.parent!.run(() => {
const testZoneSpec: ZoneSpec = new AsyncTestZoneSpec(
() => {
// Need to restore the original zone.
@ -79,7 +81,9 @@ Zone.__load_patch('asynctest', (global: any, Zone: ZoneType, api: _ZonePrivate)
proxyZoneSpec.setDelegate(previousDelegate);
}
(testZoneSpec as any).unPatchPromiseForTest();
currentZone.run(() => { finishCallback(); });
currentZone.run(() => {
finishCallback();
});
},
(error: any) => {
// Need to restore the original zone.
@ -88,7 +92,9 @@ Zone.__load_patch('asynctest', (global: any, Zone: ZoneType, api: _ZonePrivate)
proxyZoneSpec.setDelegate(previousDelegate);
}
(testZoneSpec as any).unPatchPromiseForTest();
currentZone.run(() => { failCallback(error); });
currentZone.run(() => {
failCallback(error);
});
},
'test');
proxyZoneSpec.setDelegate(testZoneSpec);

View File

@ -131,7 +131,9 @@ Zone.__load_patch('fakeasync', (global: any, Zone: ZoneType, api: _ZonePrivate)
*
* @experimental
*/
function flush(maxTurns?: number): number { return _getFakeAsyncZoneSpec().flush(maxTurns); }
function flush(maxTurns?: number): number {
return _getFakeAsyncZoneSpec().flush(maxTurns);
}
/**
* Discard all remaining periodic tasks.
@ -149,7 +151,9 @@ Zone.__load_patch('fakeasync', (global: any, Zone: ZoneType, api: _ZonePrivate)
*
* @experimental
*/
function flushMicrotasks(): void { _getFakeAsyncZoneSpec().flushMicrotasks(); }
(Zone as any)[api.symbol('fakeAsyncTest')] = {
resetFakeAsyncZone, flushMicrotasks, discardPeriodicTasks, tick, flush, fakeAsync};
function flushMicrotasks(): void {
_getFakeAsyncZoneSpec().flushMicrotasks();
}
(Zone as any)[api.symbol('fakeAsyncTest')] =
{resetFakeAsyncZone, flushMicrotasks, discardPeriodicTasks, tick, flush, fakeAsync};
});