-
Notifications
You must be signed in to change notification settings - Fork 12
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
Bugfix/ls24003755/ds to string when ds is greater than string #591
Bugfix/ls24003755/ds to string when ds is greater than string #591
Conversation
… the next implementation
…content if the target is smaller than source
…ruct. If the target is `StringType`, performs the right padding o truncating based of size and varying flag.
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.
The tests are a little bit complex, making it really difficult for me to understand their purpose. Please simplify them by focusing on the essential aspects or by adding comments. Always keep in mind that a good unit test should be understandable within a few seconds, without requiring knowledge of the entire context.
I added an high level comment to program RPG. The program is similar to original case:
|
Description
This work fixes the assignment of DS content to an element of array which is String with size smaller than DS.
Under the hood has been removed restriction of size, by considering that RPG truncates the DS content if the target is smaller than source, in this case a String. Then, has been applied the fix with an important refactoring of code, by using
when
construct. If the target isStringType
, performs the right padding or truncating based of size and varying flag. For truncating, the unused methodsetSubstring
has been refactored for the purpose.Finally, the two simple RPG programs for tests has been developed and executed on AS400.
Related to #LS24003755
Checklist:
./gradlew ktlintCheck
)./gradlew check
)docs
directory