Show folder names immediately and refresh stale index sizes without walking the whole drive.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
29
tests/Explorer.Application.Tests/MarqueeRangeTests.cs
Normal file
29
tests/Explorer.Application.Tests/MarqueeRangeTests.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Explorer.Application;
|
||||
|
||||
namespace Explorer.Application.Tests;
|
||||
|
||||
public class MarqueeRangeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Stack_selects_rows_the_band_touches()
|
||||
{
|
||||
Assert.Equal([0, 1, 2], MarqueeRange.Stack(10, 70, 10, 24));
|
||||
Assert.Equal([1], MarqueeRange.Stack(24, 30, 10, 24));
|
||||
Assert.Equal([0], MarqueeRange.Stack(10, 10.2, 10, 24));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Wrap_selects_tiles_the_band_covers()
|
||||
{
|
||||
// 3 columns, 40x40 cells. Band over the first two tiles of row 0 and the first of row 1.
|
||||
var hits = MarqueeRange.Wrap(5, 5, 55, 45, count: 8, columns: 3, itemWidth: 40, itemHeight: 40);
|
||||
Assert.Equal([0, 1, 3, 4], hits);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Wrap_ignores_cells_past_the_item_count()
|
||||
{
|
||||
var hits = MarqueeRange.Wrap(0, 0, 120, 40, count: 2, columns: 3, itemWidth: 40, itemHeight: 40);
|
||||
Assert.Equal([0, 1], hits);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user