mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
added tests for formatting in try blocks, add startEndOverlapsWithStartEnd
This commit is contained in:
13
tests/cases/fourslash/formatInTryCatchFinally.ts
Normal file
13
tests/cases/fourslash/formatInTryCatchFinally.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////try
|
||||
////{
|
||||
//// var x = 1/*1*/
|
||||
////}
|
||||
////catch (e)
|
||||
////{
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert(";")
|
||||
verify.currentLineContentIs(" var x = 1;");
|
||||
12
tests/cases/fourslash/formattingBlockInCaseClauses.ts
Normal file
12
tests/cases/fourslash/formattingBlockInCaseClauses.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////switch (1) {
|
||||
//// case 1:
|
||||
//// {
|
||||
//// /*1*/
|
||||
//// break;
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("}");
|
||||
verify.currentLineContentIs(" }");
|
||||
12
tests/cases/fourslash/formattingIfInElseBlock.ts
Normal file
12
tests/cases/fourslash/formattingIfInElseBlock.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////if (true) {
|
||||
////}
|
||||
////else {
|
||||
//// if (true) {
|
||||
//// /*1*/
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
edit.insert("}")
|
||||
verify.currentLineContentIs(" }");
|
||||
Reference in New Issue
Block a user