Skip to content
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

add missing types and conversion functions to cadence package #1224

Merged
merged 2 commits into from
Nov 8, 2021

Conversation

dsainati1
Copy link
Contributor

Closes #1219

Description

These types were previously missing from the cadence package, but had equivalents in sema and interpreter. This fills in the missing types and adds encoding, decoding, import and export converters for them.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Looks good! Could you please also add tests?

@dsainati1
Copy link
Contributor Author

Could you please also add tests?

I added tests to encoding_test and convertValues_test; is there something missing that I should also add?

@dsainati1 dsainati1 requested a review from turbolent November 8, 2021 18:09
@codecov-commenter
Copy link

Codecov Report

Merging #1224 (206c4ed) into master (4348c5d) will decrease coverage by 0.05%.
The diff coverage is 46.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1224      +/-   ##
==========================================
- Coverage   77.46%   77.40%   -0.06%     
==========================================
  Files         273      273              
  Lines       34764    34821      +57     
==========================================
+ Hits        26929    26953      +24     
- Misses       6760     6793      +33     
  Partials     1075     1075              
Flag Coverage Δ
unittests 77.40% <46.66%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
encoding/json/decode.go 71.12% <17.64%> (-2.07%) ⬇️
runtime/convertTypes.go 76.54% <47.05%> (-2.61%) ⬇️
encoding/json/encode.go 93.42% <100.00%> (ø)
types.go 76.92% <100.00%> (+1.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4348c5d...206c4ed. Read the comment docs.

@turbolent
Copy link
Member

I added tests to encoding_test and convertValues_test; is there something missing that I should also add?

Ah, I see, looks good! I had missed those, they didn't look like tests right away

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning this up!

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.

Add support for importing and exporting Account and Account Contract types
3 participants