From ae5d30d9de32bb8b7000355250d9e3cd720da869 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Fri, 14 Jun 2024 14:11:52 -0700 Subject: [PATCH] Add 1 more test --- test/attribute.tests.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/attribute.tests.ts b/test/attribute.tests.ts index 0b05888..e1f9def 100644 --- a/test/attribute.tests.ts +++ b/test/attribute.tests.ts @@ -208,6 +208,25 @@ describe("Attributes", () => { Token.Punctuation.CloseBracket]); }); + it("Generic attributes should be highlighted multiple type parameters with regular arguments", async () => { + + const input = `[Foo(true)]`; + const tokens = await tokenize(input); + + tokens.should.deep.equal([ + Token.Punctuation.OpenBracket, + Token.Type("Foo"), + Token.Punctuation.TypeParameter.Begin, + Token.Type("T1"), + Token.Punctuation.Comma, + Token.Type("T2"), + Token.Punctuation.TypeParameter.End, + Token.Punctuation.OpenParen, + Token.Literal.Boolean.True, + Token.Punctuation.CloseParen, + Token.Punctuation.CloseBracket]); + }); + it("Generic attributes should be highlighted empty", async () => { const input = `[Foo<>]`;