Skip to content

Conversation

@khanhkhanhlele
Copy link

This PR fixes typos in the file Algorithms.Tests/Strings/Similarity/OptimalStringAlignmentTests.cs.

Copilot AI review requested due to automatic review settings November 5, 2025 11:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR appears to modify a test case for the Optimal String Alignment distance algorithm, changing the second string parameter from "exmaple" (which has a transposition) to "example" (identical to the first string).

  • Changes the test input from a transposition case to an identical strings case
  • This breaks the test's intended purpose of validating transposition detection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

public void Calculate_OneTransposition_ReturnsOne()
{
var result = OptimalStringAlignment.Calculate("example", "exmaple");
var result = OptimalStringAlignment.Calculate("example", "example");
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

The test Calculate_OneTransposition_ReturnsOne is now comparing two identical strings ('example' and 'example'), which will return 0.0 instead of the expected 1.0. This breaks the test's purpose of validating transposition detection. The original value 'exmaple' should be restored as it correctly represents a transposition of adjacent characters 'a' and 'm'.

Suggested change
var result = OptimalStringAlignment.Calculate("example", "example");
var result = OptimalStringAlignment.Calculate("example", "exmaple");

Copilot uses AI. Check for mistakes.
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.

1 participant