Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Dec 12, 2024
1 parent 21a3ce4 commit ae54bf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions main/HSSF/Util/RangeAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ public int Width
{
return 0;
}
else
return toX - fromX + 1;
return toX - fromX + 1;
}
return 0;
}
Expand All @@ -199,8 +198,7 @@ public int Height
{
return 0;
}
else
return toY - fromY + 1;
return toY - fromY + 1;
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion testcases/main/SS/UserModel/BaseTestSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ public void TestGetCells_CellRange_WithSheetName()
{
var wb1 = _testDataProvider.CreateWorkbook();
var sheet = wb1.CreateSheet();
var cellRange = sheet.GetCells("Sheet1:A1:C3");
var cellRange = sheet.GetCells("Sheet1!A1:C3");
Assert.AreEqual(3, cellRange.Width);
Assert.AreEqual(3, cellRange.Height);
Assert.AreEqual(new CellAddress(0, 0), cellRange.Cells[0][0].Address);
Expand Down

0 comments on commit ae54bf2

Please sign in to comment.