-
Notifications
You must be signed in to change notification settings - Fork 54
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
Make PrimitiveRenderTypes correctly output long values with tests #58
Conversation
@@ -8,7 +8,12 @@ | |||
|
|||
object ${baseName}Constants { | |||
#for (const <- constants) | |||
<% val value = const.valueOption.map{v => "val %s: %s = %s".format(const.name, const.renderType.text, v)} %> | |||
<% val value = const.valueOption.map{v => { |
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.
I'm thinking we should move this higher up, either in ScalaConst.valueOption
or better PrimitiveRenderType.renderValue
. Is there ever a time where we don't want the L
?
Thanks for this! Can you add a test? I think it would go in |
@@ -9,6 +9,7 @@ class ScalaConstTest { | |||
@Test | |||
def testConstantGeneration(): Unit = { | |||
A.assertEquals(List(1.2, 2.1, 1.1), ConstantineConstants.LISTCONST) | |||
A.assertEquals(1000000000, ConstantineConstants.LONG) |
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.
This number is in range of integers so it doesn't confirm that the L
worked. I think one more zero will do it (and then add the L
so the test compiles)
Good catch, updated |
Patch was accepted and is live in Fsq.io. Thank you! |
This addresses #45