Skip to content

Commit

Permalink
Added test - Expands rows within a column for ragged tables
Browse files Browse the repository at this point in the history
  • Loading branch information
AdRiley committed Mar 26, 2024
1 parent d287085 commit 4493b51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Table_Tests/src/In_Memory/Table_Conversion_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ add_specs suite_builder =
expected = Table.new [["tables aaa", [1, 2, 3, 10]], ["tables bbb", [4, 5, 6, 11]], ["tables ccc", [7, 8, 9, 12]]]
table.expand_to_rows "tables" . expand_column "tables" . should_equal expected

group_builder.specify "Expands rows within a column for ragged tables" <|
table1 = Table.new [["aaa", [1, 2, 3]], ["bbb", [4, 5, 6]]]
table2 = Table.new [["aaa", [10]], ["bbb", [11]], ["ccc", [12]]]
table = Table.new [["tables", [table1, table2]]]
expected = Table.new [["tables aaa", [1, 2, 3, 10]], ["tables bbb", [4, 5, 6, 11]], ["tables ccc", [Nothing, Nothing, Nothing, 12]]]
table.expand_to_rows "tables" . expand_column "tables" . should_equal expected

group_builder.specify "Expands columns within a column" <|
column1 = Column.from_vector "c1" ["a", "b", "c"]
column2 = Column.from_vector "c2" ["d", "e"]
Expand Down

0 comments on commit 4493b51

Please sign in to comment.