2121
2222import static org .junit .jupiter .api .Assertions .assertAll ;
2323import static org .junit .jupiter .api .Assertions .assertEquals ;
24+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
2425import static org .junit .jupiter .api .Assertions .assertNull ;
2526import static org .junit .jupiter .api .Assertions .assertThrows ;
2627import static org .junit .jupiter .api .Assertions .assertTrue ;
@@ -514,7 +515,7 @@ public void testSubroutineCallWArgumentsWRetval2() throws Exception {
514515 final var engine = ScriptBasic .engine ();
515516 engine .eval ("sub applePie(b,c)\n global a\n a = c\n return 6\n EndSub" );
516517 engine .subroutine (Long .class , "applePie" ).call ("hello world" );
517- assertNull (engine .variable (String .class , "a" ));
518+ assertNotNull (engine .variable (Object .class , "a" ));
518519 }
519520
520521 @ Test
@@ -578,7 +579,7 @@ public void testSubroutineCallWArgumentsWRetval2007() throws Exception {
578579 "EndSub" );
579580 final var sub = engine .subroutine (null , "applePie" );
580581 sub .call ("hello world" );
581- assertGlobalVariableIsNotDefined (engine , "a" );
582+ assertNotNull (engine . variable ( Object . class , "a" ) );
582583 }
583584
584585 @ Test
@@ -599,7 +600,7 @@ public void testSubroutineCallWArgumentsWRetval007() throws Exception {
599600 }
600601
601602 private void assertGlobalVariableIsNotDefined (final ScriptBasic engine , final String name ) throws ScriptBasicException {
602- assertNull (engine .variable (Object .class , "a" ));
603+ assertNull (engine .variable (Object .class , name ));
603604 }
604605
605606 @ Test
0 commit comments