WIP: Fix panel.margin with positive values (#180)#286
WIP: Fix panel.margin with positive values (#180)#286ANAMASGARD wants to merge 5 commits intomasterfrom
Conversation
Tests demonstrate: - pt.to.lines() returns 0.25 for all inputs (should vary) - Zero values incorrectly return 0.25 instead of 0 - Positive values (2 lines, 1 cm) return 0.25 instead of correct conversion .
What I DidAdded comprehensive test coverage for I added tests for:
Test Results
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #286 +/- ##
=======================================
Coverage 77.71% 77.71%
=======================================
Files 164 164
Lines 8769 8769
Branches 555 555
=======================================
Hits 6815 6815
Misses 1954 1954
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Sir @tdhock The R_coverage check is failing on an unrelated test This appears unrelated to panel.margin since my PR only adds test coverage Sir can you please review the PR and guide me on what should I be doing next . |
|
can you please post screenshots? |
tdhock
left a comment
There was a problem hiding this comment.
please add a renderer test
| lines_value <- grid::unit(2, "lines") | ||
| converted <- pt.to.lines(lines_value) | ||
| expect_true(is.numeric(converted)) | ||
| expect_equal(converted, 2) | ||
| expect_gt(converted, 0) | ||
| }) | ||
| test_that("pt.to.lines handles positive cm unit correctly", { | ||
| cm_value <- grid::unit(0.5, "cm") | ||
| converted <- pt.to.lines(cm_value) | ||
| expect_true(is.numeric(converted)) | ||
| expect_gt(converted, 0) | ||
| expect_equal(as.numeric(cm_value), converted) | ||
| }) | ||
| test_that("pt.to.lines handles positive pt unit correctly", { | ||
| pt_value <- grid::unit(12, "pt") | ||
| converted <- pt.to.lines(pt_value) | ||
| expect_true(is.numeric(converted)) | ||
| expect_gt(converted, 0) | ||
| expect_false(identical(converted, as.numeric(pt_value))) | ||
| expected <- round(as.numeric(pt_value) * (0.25/5.5), digits = 2) |
7ba8e0d to
75b34d0
Compare
|
Hi @tdhock, I've addressed all your feedback :- Screenshots :-
|
|
Sir @tdhock this is a pre-existing infrastructure issue , it has nothing to do with the code changes I ahve made , please review . Error ('test-compiler-ghpages.R:59:3'): ... |
|
looks good |




FIXES #180
Current Status
Tests failing (6/22) - this commit demonstrates the bug exists.
Problem Identified
pt.to.lines() returns constant 0.25 for all inputs instead of converting the actual value.
Current behavior:
Test Output