microsoft / microsoft/VFSForGit
Update tests to use XCTAssertEqual instead of XCTAssertTrue where appropriate
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
From @pmj in a conversation regarding a failed test:
Note that this case illustrates why using XCTAssertEqual over XCTAssertTrue is to be preferred – XCTAssertEqual prints the values that failed the comparison. So we could have had a bit more detail on the nature of the test failures. It may be worth converting the asserts in testShouldHandleFileOpEvent to their respective diagnostic-outputting equivalent – I see a lot of XCTAssertTrue() with == inside.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the test named testShouldHandleFileOpEvent and inspect its XCTAssertTrue assertions that compare values with ==. Replace the applicable assertions with their diagnostic-outputting equivalent, then run the relevant test to confirm it still passes and reports comparison values on failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100