TypeScript/tests/cases/fourslash/getMatchingBraces.ts
Andy 16f3b93ffd
Simplify TextSpan creation (#21306)
* Simplify TextSpan creation

* Rename 'start' to 'pos' where possible
2018-02-08 13:51:10 -08:00

45 lines
1,021 B
TypeScript

/// <reference path="fourslash.ts"/>
//////curly braces
////module Foo [|{
//// class Bar [|{
//// private f() [|{
//// }|]
////
//// private f2() [|{
//// if (true) [|{ }|] [|{ }|];
//// }|]
//// }|]
////}|]
////
//////parenthesis
////class FooBar {
//// private f[|()|] {
//// return [|([|(1 + 1)|])|];
//// }
////
//// private f2[|()|] {
//// if [|(true)|] { }
//// }
////}
////
//////square brackets
////class Baz {
//// private f() {
//// var a: any[|[]|] = [|[[|[1, 2]|], [|[3, 4]|], 5]|];
//// }
////}
////
////// angular brackets
////class TemplateTest [|<T1, T2 extends Array>|] {
//// public foo(a, b) {
//// return [|<any>|] a;
//// }
////}
////const x: Array[|<() => void>|] = [];
for (const range of test.ranges()) {
verify.matchingBracePositionInCurrentFile(range.pos, range.end - 1);
verify.matchingBracePositionInCurrentFile(range.end - 1, range.pos);
}