Add todo comment tests.

This commit is contained in:
Cyrus Najmabadi
2014-08-15 14:47:10 -07:00
parent 751ac3103d
commit 323ecebf81
19 changed files with 99 additions and 0 deletions

View File

@@ -315,6 +315,10 @@ module FourSlashInterface {
FourSlash.currentTestState.verifyTodoComments(descriptors, test.ranges());
}
public todoCommentsInCurrentFile(descriptors: string[]) {
FourSlash.currentTestState.verifyTodoComments(descriptors, test.ranges());
}
public matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number) {
FourSlash.currentTestState.verifyMatchingBracePosition(bracePosition, expectedMatchPosition);
}

View File

@@ -0,0 +1,3 @@
//// // [|TODO|]
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|todo 1|]
//// [|hack 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO", "HACK"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|TODO(jason) 1|]
//// [|HACK 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO(jason)", "HACK"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|TODO(jason) 1|]
//// [|HACK 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["HACK", "TODO(jason)"]);

View File

@@ -0,0 +1,4 @@
//// TODO
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,3 @@
//// BAR // [|TODO|]
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,3 @@
//// "// HACK 1";
debugger;
verify.todoCommentsInCurrentFile(["TODO(jason)", "HACK"]);

View File

@@ -0,0 +1,3 @@
//// //// [|HACK 1|]
debugger;
verify.todoCommentsInCurrentFile(["TODO(jason)", "HACK"]);

View File

@@ -0,0 +1,3 @@
//// /**** [|HACK 1 |]*/ a
debugger;
verify.todoCommentsInCurrentFile(["TODO(jason)", "HACK"]);

View File

@@ -0,0 +1,3 @@
//// // not TODO
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,3 @@
//// // [|TODO with stuff|]
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,3 @@
//// // TODOnomatch
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|TODO 1|]
//// [|TODO 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// * [|TODO 1|]
//// * [|TODO 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|TODO 1|]
//// [|HACK 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO", "HACK"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|HACK 1|]
//// [|TODO 2|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO", "HACK"]);

View File

@@ -0,0 +1,6 @@
//// /*
//// [|TODO HACK|]
//// [|HACK TODO|]
//// */
debugger;
verify.todoCommentsInCurrentFile(["TODO", "HACK"]);