Skip to content

Commit

Permalink
LDEV-5075 - improve test case
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Aug 20, 2024
1 parent 2b219a9 commit 033687e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,15 @@ public static Object call(PageContext pc, Object[] objArr) throws PageException
}
}
}

}
if (cls == null) {
try {
cls = ClassUtil.loadClass(pc, path);
}
catch (Exception e) {
cfc = ComponentLoader.searchComponent(pc, null, path, null, null, false, true, true, true);
// ApplicationException ae = new ApplicationException("could not find component or class with name
// [" + path + "]");
ApplicationException ae = new ApplicationException("could not find component or class with name [" + path + "]");
// ExceptionUtil.initCauseEL(ae, e);
// throw ae;
throw ae;
}
}

Expand Down
8 changes: 3 additions & 5 deletions test/general/NullOperator.cfc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
component extends="org.lucee.cfml.test.LuceeTestCase"{


import java.util.*;
import lucee.runtime.type.StructImpl;

function run( testResults , testBox ) {
describe( "test new operator", function() {
Expand All @@ -24,14 +24,12 @@ component extends="org.lucee.cfml.test.LuceeTestCase"{
});

it(title="class: implicit with asterix import", body=function() {
import java.util.*;
var map=new HashMap();
expect(map.size()).toBe(0);
});

it(title="class: implicit with explicit import", body=function() {
import java.util.HashMap;
var map=new HashMap();
var map=new StructImpl();
expect(map.size()).toBe(0);
});

Expand Down

0 comments on commit 033687e

Please sign in to comment.