-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoscoped constructors in a vector #9630
Merged
JaroslavTulach
merged 3 commits into
develop
from
wip/jtulach/Table_Aggregate_Auto_Constructor_9614
Apr 4, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
test/Table_Tests/src/Helpers/Auto_Constructor_Instrumentation_Spec.enso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from Standard.Base import all | ||
from Standard.Test import all | ||
|
||
import project.Helpers.Table_Aggregate_Auto_Constructor | ||
|
||
add_specs suite_builder = | ||
suite_builder.group "Autoconstructor Instrumentation" group_builder-> | ||
group_builder.specify "compare ..Count and Aggregate_Column.Count" <| | ||
lines_builder = Vector.new_builder | ||
|
||
pair = Table_Aggregate_Auto_Constructor.perform lines_builder.append | ||
|
||
lines = lines_builder.to_vector | ||
text = lines.join '\n' | ||
|
||
text . should_equal """ | ||
enter c6fe8aaf-e963-4f63-a990-d15d230bc9ab | ||
enter c6fe8aaf-e963-4f63-a990-d15d230bc9ab | ||
enter c6fe8aaf-e963-4f63-a990-d15d230bc9ab | ||
callfn c6fe8aaf-e963-4f63-a990-d15d230bc9ab fn: (Count '') args: [Nothing] | ||
result c6fe8aaf-e963-4f63-a990-d15d230bc9ab result: (Count '') type: Aggregate_Column | ||
enter 00e33517-6d19-4f5a-84c5-126f59a93b67 | ||
enter 788f7b33-54ae-4452-85ff-4b7b5688b598 | ||
result 788f7b33-54ae-4452-85ff-4b7b5688b598 result: Aggregate_Column type: Aggregate_Column.type | ||
enter d1844837-30e7-46b7-bde3-72f7afec52cf | ||
result d1844837-30e7-46b7-bde3-72f7afec52cf result: UnresolvedSymbol<Count> type: Function | ||
enter 00e33517-6d19-4f5a-84c5-126f59a93b67 | ||
callfn 00e33517-6d19-4f5a-84c5-126f59a93b67 fn: null self=_ args: [Aggregate_Column] | ||
result 00e33517-6d19-4f5a-84c5-126f59a93b67 result: (Count '') type: Aggregate_Column | ||
|
||
pair.first.column_names . should_equal pair.second.column_names | ||
pair.first.column_names.map n-> | ||
first_vector = pair.first.at n . to_vector | ||
second_vector = pair.second.at n . to_vector | ||
first_vector . should_equal second_vector | ||
|
||
main filter=Nothing = | ||
suite = Test.build suite_builder-> | ||
add_specs suite_builder | ||
suite.run_with_filter filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
test/Table_Tests/src/Helpers/Table_Aggregate_Auto_Constructor.enso
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test verifies that both
Table
s contain the same elements - e.g. resolution of autoscoped constructors works fine in runtime thanks to 5f9aa25 change.