Skip to content

Commit

Permalink
add more tests for absolute and relative column, row forms
Browse files Browse the repository at this point in the history
  • Loading branch information
amiremohamadi committed Mar 20, 2020
1 parent ae6f9d2 commit 33a56b3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/cell/cell_test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,16 @@ class cell_test_suite : public test_suite
xlnt_assert_throws(xlnt::cell_reference("A"), xlnt::invalid_cell_reference);

auto ref = xlnt::cell_reference("$B$7");
xlnt_assert(ref.row_absolute());
xlnt_assert(ref.column_absolute());
xlnt_assert_equals(ref.row_absolute(), true);
xlnt_assert_equals(ref.column_absolute(), true);

ref = xlnt::cell_reference("$B7");
xlnt_assert_equals(ref.row_absolute(), false);
xlnt_assert_equals(ref.column_absolute(), true);

ref = xlnt::cell_reference("B$7");
xlnt_assert_equals(ref.row_absolute(), true);
xlnt_assert_equals(ref.column_absolute(), false);

xlnt_assert(xlnt::cell_reference("A1") == "A1");
xlnt_assert(xlnt::cell_reference("A1") != "A2");
Expand Down

0 comments on commit 33a56b3

Please sign in to comment.