Something went wrong. Try again.
A fork of https://github.com/crosspoint-reader/crosspoint-reader
Something went wrong. Try again.
441 B · 16 lines
C++
1234567891011121314151617#include <Epub/Epub/PageLink.h>#include <gtest/gtest.h>
TEST(PageLinkTest, HitAreaIncludesFingerSlopAndMinimumWidth) { PageLink link; link.x = 100; link.y = 50; link.width = 8; link.height = 20;
EXPECT_TRUE(link.contains(90, 44, 6, 28)); EXPECT_TRUE(link.contains(117, 75, 6, 28)); EXPECT_FALSE(link.contains(89, 50, 6, 28)); EXPECT_FALSE(link.contains(118, 50, 6, 28)); EXPECT_FALSE(link.contains(100, 76, 6, 28));}