diff options
Diffstat (limited to 'tests/pke-test-font.cpp')
| -rw-r--r-- | tests/pke-test-font.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/pke-test-font.cpp b/tests/pke-test-font.cpp index b4a1235..3ecd694 100644 --- a/tests/pke-test-font.cpp +++ b/tests/pke-test-font.cpp @@ -526,7 +526,8 @@ int pke_test_font_007() { coord.y *= 1080.f/2.f; PK_TEST_ASSERT_GTE_RET(2.98, coord.x); PK_TEST_ASSERT_LTE_RET(2.99, coord.x); - // tmp = coord.x; + PK_TEST_ASSERT_GTE_RET(139.86f, coord.y); + PK_TEST_ASSERT_LTE_RET(139.87f, coord.y); // bottom right coord = fibis[12].pos_scale * glm::vec4(pkeIntrinsicsPlane.vert[2], 0, 1); @@ -536,11 +537,14 @@ int pke_test_font_007() { coord.y *= 1080.f/2.f; PK_TEST_ASSERT_GTE_RET(2.98, frs.surface_area_size.x-coord.x); PK_TEST_ASSERT_LTE_RET(2.99, frs.surface_area_size.x-coord.x); - PK_TEST_ASSERT_GTE_RET(frs.surface_area_size.x-3, coord.x); - PK_TEST_ASSERT_LTE_RET(frs.surface_area_size.x-2, coord.x); + // I'm not 100% sure why these differ from above. + // However, a manual test reveals that this value is correct. + // using the test project, center some text and change its container's + // size; the text will remain in the same position (center box too). + PK_TEST_ASSERT_GTE_RET(151.11f, frs.surface_area_size.y-coord.y); + PK_TEST_ASSERT_LTE_RET(151.12f, frs.surface_area_size.y-coord.y); } - return 0; } |
