Skip to content

Update the validation expected results for recordSeparator in functional tests#382

Merged
cacheung merged 3 commits intoadobe:devfrom
cacheung:testFixForIOS17
Aug 21, 2023
Merged

Update the validation expected results for recordSeparator in functional tests#382
cacheung merged 3 commits intoadobe:devfrom
cacheung:testFixForIOS17

Conversation

@cacheung
Copy link
Copy Markdown
Contributor

@cacheung cacheung commented Aug 18, 2023

MOB-19331
Update the validation expected results for recordSeparator.
In iOS 17 and later, result displays " " (empty string).
In iOS 16 and before, result displays "\u{0000}".

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Update the validation expected results for recordSeparator.
In iOS 17 and later, result displays " " (empty string).
In iOS 16 and before, result displays "\u{0000}".
Add tvOS versions check
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 18, 2023

Codecov Report

Merging #382 (3d22a85) into dev (23d723a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #382   +/-   ##
=======================================
  Coverage   96.73%   96.73%           
=======================================
  Files          27       27           
  Lines        1653     1653           
=======================================
  Hits         1599     1599           
  Misses         54       54           

Copy link
Copy Markdown
Contributor

@kevinlind kevinlind left a comment

Choose a reason for hiding this comment

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

Looks good.
What you have is fine but another option would be to create a variable for the expected string then use the string in each test.

if #available(iOS 17, tvOS 17, *) {
   let expectedRecordSeparatorString = ""
} else {
   let expectedRecordSeparatorString = "\u{0000}"
}

Update the recordSeparator check with a variable.
@cacheung
Copy link
Copy Markdown
Contributor Author

Looks good. What you have is fine but another option would be to create a variable for the expected string then use the string in each test.

if #available(iOS 17, tvOS 17, *) {
   let expectedRecordSeparatorString = ""
} else {
   let expectedRecordSeparatorString = "\u{0000}"
}

Thanks Kevin, I Iike the way you suggest. Updated with that.

@cacheung cacheung merged commit a630ae1 into adobe:dev Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants