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

@ -10,23 +10,34 @@ import {SpyObject} from '@angular/core/testing/src/testing_internal';
class TestObj {
prop: any;
constructor(prop: any) { this.prop = prop; }
someFunc(): number { return -1; }
someComplexFunc(a: any) { return a; }
constructor(prop: any) {
this.prop = prop;
}
someFunc(): number {
return -1;
}
someComplexFunc(a: any) {
return a;
}
}
{
describe('testing', () => {
describe('should respect custom equality tester', () => {
beforeEach(() => {
const equalIfMarried =
(first: any, second: any) => { return first === 'kevin' && second === 'patricia'; };
const equalIfMarried = (first: any, second: any) => {
return first === 'kevin' && second === 'patricia';
};
jasmine.addCustomEqualityTester(equalIfMarried);
});
it('for positive test', () => { expect('kevin').toEqual('patricia'); });
it('for positive test', () => {
expect('kevin').toEqual('patricia');
});
it('for negative test', () => { expect('kevin').not.toEqual('kevin'); });
it('for negative test', () => {
expect('kevin').not.toEqual('kevin');
});
});
describe('equality', () => {
@ -83,10 +94,13 @@ class TestObj {
describe('spy objects', () => {
let spyObj: any;
beforeEach(() => { spyObj = new SpyObject(TestObj); });
beforeEach(() => {
spyObj = new SpyObject(TestObj);
});
it('should return a new spy func with no calls',
() => { expect(spyObj.spy('someFunc')).not.toHaveBeenCalled(); });
it('should return a new spy func with no calls', () => {
expect(spyObj.spy('someFunc')).not.toHaveBeenCalled();
});
it('should record function calls', () => {
spyObj.spy('someFunc').and.callFake((a: any, b: any) => a + b);