Skip to content

Commit

Permalink
(maint) Add traits for folding tests (#837)
Browse files Browse the repository at this point in the history
This commit adds trait attributes to the Code Folding tests, to make development
faster by making it possible to run only a subset of tests.
  • Loading branch information
glennsarti authored and TylerLeonhardt committed Jan 2, 2019
1 parent 59ec19b commit 10fc0f7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private void AssertFoldingReferenceArrays(
Assert.Equal(expected.Length, actual.Length);
}

[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithLF() {
// Remove and CR characters
Expand All @@ -164,6 +165,7 @@ public void LaguageServiceFindsFoldablRegionsWithLF() {
AssertFoldingReferenceArrays(expectedAllInOneScriptFolds, result);
}

[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithCRLF() {
// The Foldable regions should be the same regardless of line ending type
Expand All @@ -178,6 +180,7 @@ public void LaguageServiceFindsFoldablRegionsWithCRLF() {
AssertFoldingReferenceArrays(expectedAllInOneScriptFolds, result);
}

[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithoutLastLine() {
FoldingReference[] result = GetRegions(allInOneScript, false);
Expand All @@ -191,6 +194,7 @@ public void LaguageServiceFindsFoldablRegionsWithoutLastLine() {
AssertFoldingReferenceArrays(expectedFolds, result);
}

[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithMismatchedRegions() {
string testString =
Expand All @@ -210,6 +214,7 @@ public void LaguageServiceFindsFoldablRegionsWithMismatchedRegions() {
AssertFoldingReferenceArrays(expectedFolds, result);
}

[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithDuplicateRegions() {
string testString =
Expand All @@ -230,6 +235,7 @@ public void LaguageServiceFindsFoldablRegionsWithDuplicateRegions() {

// This tests that token matching { -> }, @{ -> } and
// ( -> ), @( -> ) and $( -> ) does not confuse the folder
[Trait("Category", "Folding")]
[Fact]
public void LaguageServiceFindsFoldablRegionsWithSameEndToken() {
string testString =
Expand Down

0 comments on commit 10fc0f7

Please sign in to comment.