diff options
| author | Randy Morgan <[email protected]> | 2012-05-19 09:44:29 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-19 09:44:29 +0900 |
| commit | 869acca69612b9197d5bdf7ff8c543e51438f9ed (patch) | |
| tree | 924edd9fafae0c77229c2d9979f8dfc317179a8d /test/workbook/worksheet/tc_comment.rb | |
| parent | c8b40481b1ab947fbb783657e19749b59b716cfe (diff) | |
| download | caxlsx-869acca69612b9197d5bdf7ff8c543e51438f9ed.tar.gz caxlsx-869acca69612b9197d5bdf7ff8c543e51438f9ed.zip | |
correct relation management for comments and some spec improvements for package to provide more breadth in serialization integration testing.
Diffstat (limited to 'test/workbook/worksheet/tc_comment.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_comment.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/workbook/worksheet/tc_comment.rb b/test/workbook/worksheet/tc_comment.rb index 352f30a0..0cb79bcc 100644 --- a/test/workbook/worksheet/tc_comment.rb +++ b/test/workbook/worksheet/tc_comment.rb @@ -34,14 +34,15 @@ class TestComment < Test::Unit::TestCase end def test_vml_shape + pos = Axlsx::name_to_indices(@c1.ref) assert(@c1.vml_shape.is_a?(Axlsx::VmlShape)) - assert(@c1.vml_shape.column == Axlsx::name_to_indices(@c1.ref)[0]) - assert(@c1.vml_shape.row == Axlsx::name_to_indices(@c1.ref)[1]) - assert(@c1.vml_shape.row == Axlsx::name_to_indices(@c1.ref)[1]) - assert(@c1.vml_shape.left_column == Axlsx::name_to_indices(@c1.ref)[1]+1) - assert(@c1.vml_shape.top_row == Axlsx::name_to_indices(@c1.ref)[1]) - assert(@c1.vml_shape.right_column == Axlsx::name_to_indices(@c1.ref)[0]+4) - assert(@c1.vml_shape.bottom_row == Axlsx::name_to_indices(@c1.ref)[1]+4) + assert(@c1.vml_shape.column == pos[0]) + assert(@c1.vml_shape.row == pos[1]) + assert(@c1.vml_shape.row == pos[1]) + assert_equal(pos[0], @c1.vml_shape.left_column) + assert(@c1.vml_shape.top_row == pos[1]) + assert_equal(pos[0] + 2 , @c1.vml_shape.right_column) + assert(@c1.vml_shape.bottom_row == pos[1]+4) end def to_xml_string |
