summaryrefslogtreecommitdiff
path: root/test/pdf.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/pdf.zig')
-rw-r--r--test/pdf.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/pdf.zig b/test/pdf.zig
index cc4a258d..ea23f90a 100644
--- a/test/pdf.zig
+++ b/test/pdf.zig
@@ -1610,7 +1610,7 @@ test "PdfTint cycles pane-local state without adding tag clutter" {
// here rather than inherited from init.
_ = try p.newShell(1, "");
_ = layout.splitColumn(p, 0, 1, false);
- pardes.test_api.sync(p); // rects for the new column, exactly as the two-pane boot did
+ p.sync(); // rects for the new column, exactly as the two-pane boot did
try std.testing.expect(!hasPdf(p.panes[1].?));
try std.testing.expect(pardes.test_api.runBuiltin(
p,
@@ -1852,7 +1852,7 @@ test "PDF pane geometry change preserves its page-relative position" {
// so the divider drag below needs a second column to take the width from.
_ = try p.newShell(1, "");
_ = layout.splitColumn(p, 0, 1, false);
- pardes.test_api.sync(p); // rects for the new column, exactly as the two-pane boot did
+ p.sync(); // rects for the new column, exactly as the two-pane boot did
const pane = p.panes[0].?;
const pv = &pane.pdf.?;
p.native_images = true;
@@ -1949,7 +1949,7 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 0), pv.search_hit);
try std.testing.expectEqual(@as(usize, 0), pane.search_row.?);
const first = try p.render(frame.allocator());
@@ -1968,14 +1968,14 @@ test "PDF n/N addresses and reveals distinct MuPDF hits on one page" {
try std.testing.expect(first_y >= first_geometry.src.y and
first_y < first_geometry.src.y + first_geometry.src.h);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 1), pv.search_hit);
try std.testing.expectEqual(@as(usize, 2), pane.search_row.?);
_ = frame.reset(.retain_capacity);
const second = try p.render(frame.allocator());
try std.testing.expectEqual(revision, second.images[0].?.native.revision);
- try std.testing.expect(pardes.test_api.searchStep(p, 0, 1));
+ try std.testing.expect(pardes.look.searchStep(p, 0, 1));
try std.testing.expectEqual(@as(usize, 2), pv.search_hit);
try std.testing.expectEqual(@as(usize, 4), pane.search_row.?);
_ = frame.reset(.retain_capacity);
@@ -2092,7 +2092,7 @@ test "PDF native mouse selection, Look, and highlights share page geometry" {
};
const word_col = selected_col orelse return error.PdfMouseMappingMissedWord;
try std.testing.expect(std.ascii.findIgnoreCase(
- pardes.test_api.heldSelection(p, 0).?,
+ pardes.exec.heldSelection(p, 0).?,
"Pardes",
) != null);
@@ -2368,7 +2368,7 @@ test "Esc back into a PDF keeps the offset within its page" {
const doc = p.active;
const dp = p.panes[doc].?;
try std.testing.expect(dp.pdf != null);
- pardes.test_api.sync(p);
+ p.sync();
// Read a little way DOWN the page you are on, then step away.
const pv = &dp.pdf.?;
@@ -2376,12 +2376,12 @@ test "Esc back into a PDF keeps the offset within its page" {
const mid = pv.document_scroll_y;
pv.scroll_to_page_pending = false;
p.update(.{ .key = .{ .cp = 'n', .alt = true } }); // a shell under the doc
- pardes.test_api.sync(p);
+ p.sync();
const shell = p.active;
try std.testing.expect(shell != doc);
p.update(.{ .key = .{ .cp = Key.escape } }); // Esc: back into the PDF
- pardes.test_api.sync(p);
+ p.sync();
try std.testing.expectEqual(doc, p.active);
// The jumps stack records a PDF as its PAGE, so returning revealed the page