TypeScript/tests/cases/fourslash/indentationInAmdIife.ts

52 lines
1,022 B
TypeScript
Raw Normal View History

2017-06-22 00:05:15 +02:00
/// <reference path="fourslash.ts"/>
//// function foo(a?,b?) { b(a); }
////
//// (foo)(1, function() {/*4_1*/
2017-06-22 00:05:15 +02:00
//// });
////
2017-06-22 02:04:39 +02:00
//// // No line-breaks in the expression part of the call expression
2017-06-22 00:05:15 +02:00
////
//// (foo)
//// (1, function () {/*8_0*/
//// });
//// (foo)(1,
//// function () {/*8_1*/
//// });
//// (foo)(1, function()
//// {/*4_2*/
//// });
////
2017-06-22 02:04:39 +02:00
//// // Contains line-breaks in the expression part of the call expression.
////
//// (
//// foo)(1, function () {/*8_4*/
2017-06-22 02:04:39 +02:00
//// });
2017-06-22 00:05:15 +02:00
//// (foo
//// )(1, function () {/*4_3*/
//// });
//// (foo
//// )
//// (1, function () {/*8_2*/
//// });
//// (foo
//// )(1,
//// function () {/*8_3*/
//// });
//// (foo
//// )(1, function()
//// {/*4_4*/
//// });
for (let i = 1; i < 5; ++i) {
2017-06-22 00:05:15 +02:00
goTo.marker(`4_${i}`);
edit.insertLine("");
verify.indentationIs(4);
}
for (let i = 1; i < 5; ++i) {
2017-06-22 00:05:15 +02:00
goTo.marker(`8_${i}`);
edit.insertLine("");
verify.indentationIs(8);
}