-
Notifications
You must be signed in to change notification settings - Fork 41
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
v5.x-fromBase-type-param: Add type parameter to fromBase16 #819
base: develop
Are you sure you want to change the base?
Conversation
updating test that was failing
Adding fromBase16 to the frontend
set HAS_SECRETS on CI env;
…st to cover Array[Byte] use case.
val bytes = Base16.decode(arg.value).get | ||
tpe match { | ||
case SByteArray => ByteArrayConstant(bytes) | ||
case other => ??? |
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.
see #814
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.
see updated version
// no type specified | ||
an[InvalidArguments] should be thrownBy comp(""" fromBase16("0e0131") """) | ||
// declared type != parsed type | ||
an[InvalidArguments] should be thrownBy comp(""" fromBase16[Int]("0e0131") """) |
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.
- use assertExceptionThrown to test exceptions more precisely. See how it is used all over the code.
- Since the method should be generic and work for all types.
This mean all types should be tested. See ConstantSerializerSpecification or DataSerializerSpecification for how it may look like. Those specifications are a bit less generic that they could be.
Ideally you need: - a generator of all valid types
- a generator of valid values for any valid type
- use forAll to test comp(...) for any (type, value) pair
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.
see updated version
Codecov Report
@@ Coverage Diff @@
## develop #819 +/- ##
===========================================
- Coverage 71.51% 71.50% -0.02%
===========================================
Files 246 246
Lines 18740 18769 +29
Branches 560 620 +60
===========================================
+ Hits 13402 13420 +18
- Misses 5338 5349 +11
Help us with your feedback. Take ten seconds to tell us how you rate us. |
66650d5
to
9ab6b62
Compare
…erTest and SigmaParserTest.
@aslesarenko please review updated version of PR |
No description provided.