Skip to content

Commit 03dac25

Browse files
committed
add test case
1 parent f4458a7 commit 03dac25

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

plugins/hls-semantic-tokens-plugin/test/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ semanticTokensDataTypeTests =
203203
"get semantic Tokens"
204204
[ goldenWithSemanticTokensWithDefaultConfig "simple datatype" "TDataType",
205205
goldenWithSemanticTokensWithDefaultConfig "record" "TRecord",
206+
goldenWithSemanticTokensWithDefaultConfig "TRecordWildCards" "TRecordWildCards",
206207
goldenWithSemanticTokensWithDefaultConfig "record With DuplicateRecordFields" "TRecordDuplicateRecordFields",
207208
goldenWithSemanticTokensWithDefaultConfig "datatype import" "TDatatypeImported",
208209
goldenWithSemanticTokensWithDefaultConfig "datatype family" "TDataFamily",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
4:6-9 TTypeConstructor "Foo"
2+
4:12-15 TDataConstructor "Foo"
3+
4:18-21 TRecordField "foo"
4+
4:25-28 TTypeConstructor "Int"
5+
5:1-5 TVariable "foo1"
6+
5:8-11 TDataConstructor "Foo"
7+
6:1-10 TFunction "unpackFoo"
8+
6:14-17 TTypeConstructor "Foo"
9+
6:21-24 TTypeConstructor "Int"
10+
7:1-10 TFunction "unpackFoo"
11+
7:11-14 TDataConstructor "Foo"
12+
7:21-24 TVariable "foo"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{-# LANGUAGE RecordWildCards #-}
2+
module TRecordWildCards where
3+
4+
data Foo = Foo { foo :: Int }
5+
foo1 = Foo 1
6+
unpackFoo :: Foo -> Int
7+
unpackFoo Foo{..} = foo

0 commit comments

Comments
 (0)