Skip to content

Conversation

@sritchie
Copy link
Collaborator

This PR increases our coverage for the worst offenders in algebird-core - the generated product and tuple aggregators.

I've also modified the generation script so that each data structure extends its parent. This reduces duplication and allows us to test ALL methods with ringLaws alone.

The inheritance doesn't break binary compatibility.

# Example: "T,U"
type_values_commaed = TYPE_SYMBOLS.first(n).join(", ")
"class Tuple#{n}#{algebraic_structure.capitalize}[#{type_values_commaed}](implicit #{get_type_parameters(n, algebraic_structure)}) extends #{algebraic_structure.capitalize}[(#{type_values_commaed})]"
extends = ["#{algebraic_structure.capitalize}[(#{type_values_commaed})]"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything except for this change is a formatting thing that removes the extra space before :. Strange that the checked-in script didn't generate the checked-in code, by the way.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I think it is: code formatting has run on the code.

@codecov-io
Copy link

codecov-io commented Nov 29, 2016

Current coverage is 72.90% (diff: 100%)

Merging #585 into develop will increase coverage by 8.49%

@@            develop       #585   diff @@
==========================================
  Files           111        111          
  Lines          4572       4425   -147   
  Methods        4154       4009   -145   
  Messages          0          0          
  Branches        379        377     -2   
==========================================
+ Hits           2945       3226   +281   
+ Misses         1627       1199   -428   
  Partials          0          0          

Powered by Codecov. Last update c91e1fb...e56c6e2

@sritchie sritchie added this to the 0.13.0 milestone Nov 29, 2016
Copy link
Collaborator

@johnynek johnynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so great! Thanks Sam!

# Example: "T,U"
type_values_commaed = TYPE_SYMBOLS.first(n).join(", ")
"class Tuple#{n}#{algebraic_structure.capitalize}[#{type_values_commaed}](implicit #{get_type_parameters(n, algebraic_structure)}) extends #{algebraic_structure.capitalize}[(#{type_values_commaed})]"
extends = ["#{algebraic_structure.capitalize}[(#{type_values_commaed})]"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I think it is: code formatting has run on the code.

@johnynek johnynek merged commit 10ee2c0 into develop Nov 29, 2016
@johnynek johnynek deleted the sritchie/test_tuple_generators branch November 29, 2016 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants