Skip to content

Commit 1666063

Browse files
committed
Fixed formatting, improved test
1 parent 343e895 commit 1666063

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/com/scriptbasic/utility/functions/StringFunctions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static public String cstr(final Object o) throws BasicRuntimeException {
7979
@BasicFunction(classification = {com.scriptbasic.classification.String.class,
8080
com.scriptbasic.classification.Utility.class})
8181
static public String ltrim(final Object o) throws BasicRuntimeException {
82-
if(o==null) {
82+
if (o == null) {
8383
return null;
8484
}
8585
final String s = cstr(o);

src/test/resources/com/scriptbasic/testprograms/TestStringFunctions.bas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ assert("trim", trim(v)="1234")
1010
assert("rtrim", rtrim(v)=" 1234")
1111

1212
' Test null values
13-
assert("ltrim_with_null", IsNull(ltrim(xxx)))
14-
assert("trim_with_null", IsNull(trim(xxx)))
15-
assert("rtrim_with_null", IsNull(rtrim(xxx)))
13+
assert("ltrim_with_null", IsNull(ltrim(undefined_var)))
14+
assert("trim_with_null", IsNull(trim(undefined_var)))
15+
assert("rtrim_with_null", IsNull(rtrim(undefined_var)))
1616

1717
' Test left, mid, right functions
1818
v = 1234

0 commit comments

Comments
 (0)