feat: adjust formatting for clang-format v1.0.19.

This commit is contained in:
Martin Probst
2015-06-12 07:50:45 -07:00
parent 1c2abbc61d
commit a6e7123995
50 changed files with 363 additions and 350 deletions

View File

@ -89,9 +89,12 @@ export class TestDefinition {
*/
export function getAllDefinitions(): List<TestDefinition> {
var allDefs = _availableDefinitions;
allDefs = ListWrapper.concat(allDefs, StringMapWrapper.keys(_ExpressionWithLocals.availableDefinitions));
allDefs = ListWrapper.concat(allDefs, StringMapWrapper.keys(_ExpressionWithMode.availableDefinitions));
allDefs = ListWrapper.concat(allDefs, StringMapWrapper.keys(_DirectiveUpdating.availableDefinitions));
allDefs = ListWrapper.concat(allDefs,
StringMapWrapper.keys(_ExpressionWithLocals.availableDefinitions));
allDefs =
ListWrapper.concat(allDefs, StringMapWrapper.keys(_ExpressionWithMode.availableDefinitions));
allDefs =
ListWrapper.concat(allDefs, StringMapWrapper.keys(_DirectiveUpdating.availableDefinitions));
return ListWrapper.map(allDefs, (id) => getDefinition(id));
}

View File

@ -87,7 +87,8 @@ export function main() {
function _createWithoutHydrate(expression: string) {
var dispatcher = new TestDispatcher();
var registry = null;
var cd = _getProtoChangeDetector(getDefinition(expression).cdDef, registry).instantiate(dispatcher);
var cd = _getProtoChangeDetector(getDefinition(expression).cdDef, registry)
.instantiate(dispatcher);
return new _ChangeDetectorAndDispatcher(cd, dispatcher);
}
@ -334,7 +335,8 @@ export function main() {
it('should happen directly, without invoking the dispatcher', () => {
var val = _createWithoutHydrate('directNoDispatcher');
val.changeDetector.hydrate(_DEFAULT_CONTEXT, null, new FakeDirectives([directive1], []));
val.changeDetector.hydrate(_DEFAULT_CONTEXT, null,
new FakeDirectives([directive1], []));
val.changeDetector.detectChanges();
expect(val.dispatcher.loggedValues).toEqual([]);
expect(directive1.a).toEqual(42);
@ -465,11 +467,11 @@ export function main() {
var orderOfOperations = [];
var directiveInShadowDom = null;
directiveInShadowDom =
new TestDirective(() => { ListWrapper.push(orderOfOperations, directiveInShadowDom); });
directiveInShadowDom = new TestDirective(
() => { ListWrapper.push(orderOfOperations, directiveInShadowDom); });
var parentDirective = null;
parentDirective =
new TestDirective(() => { ListWrapper.push(orderOfOperations, parentDirective); });
parentDirective = new TestDirective(
() => { ListWrapper.push(orderOfOperations, parentDirective); });
parent.hydrate(_DEFAULT_CONTEXT, null, new FakeDirectives([parentDirective], []));
child.hydrate(_DEFAULT_CONTEXT, null, new FakeDirectives([directiveInShadowDom], []));
@ -594,14 +596,13 @@ export function main() {
});
describe('mode', () => {
it('should set the mode to CHECK_ALWAYS when the default change detection is used',
() => {
var cd = _createWithoutHydrate('emptyUsingDefaultStrategy').changeDetector;
expect(cd.mode).toEqual(null);
it('should set the mode to CHECK_ALWAYS when the default change detection is used', () => {
var cd = _createWithoutHydrate('emptyUsingDefaultStrategy').changeDetector;
expect(cd.mode).toEqual(null);
cd.hydrate(_DEFAULT_CONTEXT, null, null);
expect(cd.mode).toEqual(CHECK_ALWAYS);
});
cd.hydrate(_DEFAULT_CONTEXT, null, null);
expect(cd.mode).toEqual(CHECK_ALWAYS);
});
it('should set the mode to CHECK_ONCE when the push change detection is used', () => {
var cd = _createWithoutHydrate('emptyUsingOnPushStrategy').changeDetector;

View File

@ -462,14 +462,14 @@ export function main() {
function exprSources(templateBindings) {
return ListWrapper.map(templateBindings, (binding) => isPresent(binding.expression) ?
binding.expression.source :
null);
binding.expression.source :
null);
}
function exprAsts(templateBindings) {
return ListWrapper.map(templateBindings, (binding) => isPresent(binding.expression) ?
binding.expression :
null);
binding.expression :
null);
}
it('should parse an empty string', () => {

View File

@ -31,9 +31,7 @@ export function main() {
function normalize(obj: string): string { return StringWrapper.replace(obj, regNewLine, ''); }
beforeEach(() => {
inceptionObj = {
dream: {dream: {dream: 'Limbo'}}
};
inceptionObj = {dream: {dream: {dream: 'Limbo'}}};
inceptionObjString = "{\n" + " \"dream\": {\n" + " \"dream\": {\n" +
" \"dream\": \"Limbo\"\n" + " }\n" + " }\n" + "}";