Skip to content

Commit

Permalink
Changelog and a couple more tests added.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdunkerley committed Jan 29, 2024
1 parent 34f7923 commit c92bd0a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@
operations.][5156]
- [Attach a warning when Nothing is used as a value in a comparison or `is_in`
`Filter_Condition`.][8865]
- [Added `File_By_Line` type allowing processing a file line by line. New
faster JSON parser based off Jackson.][8719]

[debug-shortcuts]:
https://github.com/enso-org/enso/blob/develop/app/gui/docs/product/shortcuts.md#debug
Expand Down Expand Up @@ -871,6 +873,7 @@
[8606]: https://github.com/enso-org/enso/pull/8606
[8627]: https://github.com/enso-org/enso/pull/8627
[8691]: https://github.com/enso-org/enso/pull/8691
[8719]: https://github.com/enso-org/enso/pull/8719
[8865]: https://github.com/enso-org/enso/pull/8865

#### Enso Compiler
Expand Down
15 changes: 14 additions & 1 deletion test/Table_Tests/src/Database/Common/Common_Spec.enso
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from Standard.Base import all
import Standard.Base.Errors.Common.Index_Out_Of_Bounds
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument

from Standard.Table import Table, Sort_Column
Expand Down Expand Up @@ -170,7 +171,19 @@ add_specs (suite_builder : Suite_Builder) (prefix : Text) (create_connection_fn
group_builder.specify "should allow to materialize columns directly into a Vector" <|
v = data.t1.at 'a' . to_vector
v . should_equal [1, 4]


group_builder.specify "should allow getting specific elements" <|
test_column = data.t1.at 'a'
test_column.get 0 . should_equal 1
test_column.get 3 . should_equal Nothing
test_column.get 4 -1 . should_equal -1

group_builder.specify "should allow getting specific elements (with at)" <|
test_column = data.t1.at 'a'
test_column.at 0 . should_equal 1
test_column.at 1 . should_equal 4
test_column.at 3 . should_fail_with Index_Out_Of_Bounds

group_builder.specify "should handle bigger result sets" <|
data.big_table.read.row_count . should_equal data.big_size

Expand Down
7 changes: 7 additions & 0 deletions test/Table_Tests/src/In_Memory/Column_Spec.enso
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ add_specs suite_builder =
empty_column = Column.from_vector "Test" []

group_builder.specify "should allow getting specific elements" <|
test_column.get 0 . should_equal 1
test_column.get 2 . should_equal 5
test_column.get 5 . should_equal 6
test_column.get 6 . should_equal Nothing
empty_column.get 0 -1 . should_equal -1

group_builder.specify "should allow getting specific elements (with at)" <|
test_column.at 0 . should_equal 1
test_column.at 2 . should_equal 5
test_column.at 5 . should_equal 6
Expand Down

0 comments on commit c92bd0a

Please sign in to comment.