Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
y-iihoshi committed Jan 1, 2025
1 parent dba1478 commit 8bfedd5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
9 changes: 0 additions & 9 deletions ThScoreFileConverter.Tests/Helpers/IntegerHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ public void ToOneBasedTestExceeded()
_ = Assert.ThrowsException<ArgumentOutOfRangeException>(() => IntegerHelper.ToOneBased(10));
}

[TestMethod]
public void ParseTest()
{
Assert.AreEqual(123, IntegerHelper.Parse("123"));
_ = Assert.ThrowsException<ArgumentNullException>(() => IntegerHelper.Parse(null!));
_ = Assert.ThrowsException<FormatException>(() => IntegerHelper.Parse(string.Empty));
_ = Assert.ThrowsException<FormatException>(() => IntegerHelper.Parse("abc"));
}

[DataTestMethod]
[DataRow(0, 1)]
[DataRow(1, 1)]
Expand Down
10 changes: 0 additions & 10 deletions ThScoreFileConverter/Helpers/IntegerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ public static int ToOneBased(int input)
return (input + 1) % 10;
}

/// <summary>
/// Converts the string representation of a number to its 32-bit signed integer equivalent.
/// </summary>
/// <param name="s">A string containing a number to convert.</param>
/// <returns>A 32-bit signed integer equivalent to the number contained in <paramref name="s"/>.</returns>
public static int Parse(string s)
{
return int.Parse(s, CultureInfo.InvariantCulture);
}

/// <summary>
/// Gets the number of decimal digits.
/// </summary>
Expand Down

0 comments on commit 8bfedd5

Please sign in to comment.