Skip to content

Unit tests for misc lib/utils/ files - #851

Closed
lambda7xx wants to merge 144 commits into
repo-refactor-lambdafrom
repo-refactor-lambda-test
Closed

Unit tests for misc lib/utils/ files#851
lambda7xx wants to merge 144 commits into
repo-refactor-lambdafrom
repo-refactor-lambda-test

Conversation

@lambda7xx

@lambda7xx lambda7xx commented Jul 10, 2023

Copy link
Copy Markdown
Contributor

Description of changes:
add test for repo-refactor utils test

Before merging:

  • add test for bidict, stack_map, stack_string, stack_vector, disjoint_set
  • add test for dot_file, record_formatter
  • add test for containers
    • join_strings
    • find
    • sum
    • sum with condition
    • product
    • product_where
    • contains
    • contains_key
    • map_keys
    • filter_keys
    • map_values
    • keys
    • values
    • unique
    • item
    • index_of
    • intersection
    • are_disjoint
    • restrict_keys
    • merge_maps
    • merge_maps(bidict)
    • lookup_in
    • lookup_in_l
    • lookup_in_r
    • set_union
    • is_subseteq_of
    • is_superseteq_of
    • map_over_unordered_set
    • get_only
    • get_first
    • extend
    • all_of
    • count
    • are_all_same
    • vector_transform
    • as_vector
    • transform_vector
    • transform
    • maximum
    • enumerate
    • reversed
    • sorted_by
    • value_all
    • subvec
    • extend
    • flatmap
  • add test for others

This change is Reviewable

@lambda7xx lambda7xx changed the title add test for repo-refactor utils test add test for repo-refactor utils graph test Jul 10, 2023
@lambda7xx

Copy link
Copy Markdown
Contributor Author

lib/utils/test/src/test_variant.cc line 21 at r1 (raw file):

Previously, lockshaw (Colin Unger) wrote…

Cast doesn't function based on conversion of the element types of variant (i.e., float -> double). This test case is a bit unclear as to exactly what the semantics of cast should be

I add comments

@lambda7xx

Copy link
Copy Markdown
Contributor Author

lib/utils/test/src/test_stack_string.cc line 17 at r1 (raw file):

Previously, lockshaw (Colin Unger) wrote…

What if the assigned string is shorter than the MAXSIZE or longer than the MAXSIZE?

add test for shorter. it we use longer than the MAXSIZE, the assert fails and throw an error.

@lockshaw lockshaw changed the title add test for repo-refactor utils graph test Unit tests for lib/utils/graph Aug 8, 2023
@lockshaw lockshaw changed the title Unit tests for lib/utils/graph Unit tests for misc lib/utils/ files Aug 8, 2023
@lambda7xx
lambda7xx requested a review from lockshaw August 8, 2023 11:58
@lockshaw
lockshaw changed the base branch from tmp/pr842 to repo-refactor-lambda August 9, 2023 22:25
@lockshaw lockshaw mentioned this pull request Aug 9, 2023
1 task
@lockshaw

lockshaw commented Aug 9, 2023

Copy link
Copy Markdown
Collaborator

Moving to #940

@lockshaw lockshaw closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants