Skip to content

Commit

Permalink
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag i…
Browse files Browse the repository at this point in the history
…n .NET. (#13706)
  • Loading branch information
rolfbjarne authored Jan 13, 2022
1 parent 5c342f0 commit 76cd53f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Foundation/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public enum NSLinguisticTagScheme {
Script,
}

#if !XAMCORE_4_0
#if !NET
public enum NSLinguisticTagUnit {
#else
public enum NSLinguisticTag {
Expand Down
6 changes: 3 additions & 3 deletions src/foundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@ interface NSLinguisticTagger {

delegate void LinguisticTagEnumerator (string tag, NSRange tokenRange, bool stop);

#if !XAMCORE_4_0
#if !NET
[Obsolete ("Use 'NSLinguisticTagUnit' enum instead.")]
[Static]
interface NSLinguisticTag {
Expand Down Expand Up @@ -8646,7 +8646,7 @@ interface NSInputStream {
[Category]
[BaseType (typeof(NSString))]
interface NSLinguisticAnalysis {
#if XAMCORE_4_0
#if NET
[return: BindAs (typeof (NSLinguisticTag []))]
#else
[return: BindAs (typeof (NSLinguisticTagUnit []))]
Expand All @@ -8656,7 +8656,7 @@ interface NSLinguisticAnalysis {
NSString[] GetLinguisticTags (NSRange range, NSString scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue[] tokenRanges);

[Wrap ("GetLinguisticTags (This, range, scheme.GetConstant ()!, options, orthography, out tokenRanges)")]
#if XAMCORE_4_0
#if NET
NSLinguisticTag[] GetLinguisticTags (NSRange range, NSLinguisticTagScheme scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue[] tokenRanges);
#else
NSLinguisticTagUnit[] GetLinguisticTags (NSRange range, NSLinguisticTagScheme scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue[] tokenRanges);
Expand Down
4 changes: 2 additions & 2 deletions tests/monotouch-test/Foundation/NSLinguisticAnalysisTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void EnumerateSubstringsInRangeTest ()
expectedWordCount = 4;
#endif
Assert.AreEqual (expectedWordCount, words.Count, "Word count: " + string.Join (", ", words));
#if XAMCORE_4_0
#if NET
Assert.True (words.Contains (NSLinguisticTag.Word.GetConstant ()), "Token type.");
#else
Assert.True (words.Contains (NSLinguisticTagUnit.Word.GetConstant ()), "Token type.");
Expand All @@ -58,7 +58,7 @@ public void StopEnumerateSubstringsInRangeTest ()
var range = new NSRange (0, testString.Length - 1);
testString.EnumerateLinguisticTags (range, NSLinguisticTagScheme.Token, NSLinguisticTaggerOptions.OmitWhitespace, null, StopEnumerator);
Assert.AreEqual (1, words.Count, "Word count");
#if XAMCORE_4_0
#if NET
Assert.True (words.Contains (NSLinguisticTag.Word.GetConstant ()), "Token type.");
#else
Assert.True (words.Contains (NSLinguisticTagUnit.Word.GetConstant ()), "Token type.");
Expand Down

5 comments on commit 76cd53f

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API Current PR diff

ℹ️ API Diff (from PR only) (please review changes)

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

Generator diff

ℹ️ Generator Diff (please review changes)

Packages generated

View packages

Test results

2 tests failed, 233 tests passed.

Failed tests

  • monotouch-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2571 Passed: 2415 Inconclusive: 9 Failed: 1 Ignored: 155)
  • monotouch-test/Mac [dotnet]/Debug (static registrar) [dotnet]: Failed (Test run failed.
    Tests run: 2568 Passed: 2413 Inconclusive: 9 Failed: 1 Ignored: 154)

Pipeline on Agent XAMBOT-1033.BigSur'
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag in .NET. (#13706)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests iOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-iOS64\TestSummary.md not found.

Pipeline on Agent
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag in .NET. (#13706)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS (no summary found). 🔥

Result file D:\a\1\s\Reports\TestSummary-tvos\TestSummary.md not found.

Pipeline on Agent
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag in .NET. (#13706)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Tests failed on macOS Mac Catalina (10.15) ❌

Tests failed on Mac Catalina (10.15).

Failed tests are:

  • introspection

Pipeline on Agent
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag in .NET. (#13706)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Tests failed on macOS M1 - Mac Big Sur (11.5) ❌

Tests failed on M1 - Mac Big Sur (11.5).

Failed tests are:

  • monotouch-test

Pipeline on Agent
[Foundation] Rename the NSLinguisticTagUnit enum to NSLinguisticTag in .NET. (#13706)

Please sign in to comment.