Repository navigation
Conversation
|
|
Can you add some unit tests for this, you can use the examples you gave |
|
I can try but I'm not comfortable with JUnit and the already implemented test. What do you expect exactly ? something like that : https://github.com/ControlSystemStudio/phoebus/blob/master/app/display/runtime/src/test/java/org/csstudio/display/builder/runtime/test/RulesJythonScriptTest.java but for ValueUtil.getString ? ValueUtilJythonScriptTest.java or integrated in an already existing file ? |
|
No worries... I can add them I will merge this next Thursday after the developers meeting. Changes to the Util classes which are heavily used in scripting ( where things tend to be quite brittle ) can have wider impacts since we don't know all the various use cases. But... In general I think this is an improvement so we should be merging this. |



In ValueUtil the precision is set to 0, that prevents floating or double number to display the number after the decimal point
So if for example we use the script provided in the example of phoebus for table
After correction it is displayed correctly.


prec to 2
prec to 1
The advantage of using getString instead of getDouble is that it is displaying also the egu field