Adding tests.

This commit is contained in:
Cyrus Najmabadi
2015-06-02 15:00:39 -07:00
parent 513183e7b1
commit 8fcd29f843
2 changed files with 46 additions and 0 deletions
@@ -0,0 +1,26 @@
/// <reference path="fourslash.ts"/>
//// /** @param foo { function(x): string } */
//// var v;
var c = classification;
verify.syntacticClassificationsAre(
c.comment("/** "),
c.punctuation("@"),
c.docCommentTagName("param"),
c.comment(" "),
c.parameterName("foo"),
c.comment(" "),
c.punctuation("{"),
c.keyword("function"),
c.punctuation("("),
c.text("x"),
c.punctuation(")"),
c.punctuation(":"),
c.keyword("string"),
c.punctuation("}"),
c.comment(" */"),
c.keyword("var"),
c.text("v"),
c.punctuation(";"));
@@ -0,0 +1,20 @@
/// <reference path="fourslash.ts"/>
//// /** @param foo { number /* } */
//// var v;
var c = classification;
verify.syntacticClassificationsAre(
c.comment("/** "),
c.punctuation("@"),
c.docCommentTagName("param"),
c.comment(" "),
c.parameterName("foo"),
c.comment(" "),
c.punctuation("{"),
c.keyword("number"),
c.comment(" /* } */"),
c.comment("/* } */"),
c.keyword("var"),
c.text("v"),
c.punctuation(";"));