-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DC-4826 - rewrite Elvis bytecode genration (so sub method)
- Loading branch information
1 parent
81a4961
commit 0c878f4
Showing
4 changed files
with
98 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
component extends = "org.lucee.cfml.test.LuceeTestCase" { | ||
|
||
|
||
function run( testResults, testBox ){ | ||
describe( "Test case for LDEV-4826", function(){ | ||
|
||
it( title = "struct method call for existing value", body = function( currentSpec ){ | ||
var sct = {}; | ||
sct["key"]="Susi"; | ||
expect( sct.get( "key" ) ?: "EMPTY" ).toBe( "Susi" ); | ||
}); | ||
|
||
it( title = "struct method call for existing value containg null", body = function( currentSpec ){ | ||
var sct = {}; | ||
sct["nulls"]=nullValue(); | ||
expect( sct.get( "nulls" ) ?: "EMPTY" ).toBe( "EMPTY" ); | ||
}); | ||
|
||
it( title = "struct method call for NOT existing value ", body = function( currentSpec ){ | ||
var sct = {}; | ||
sct["nulls"]=nullValue(); | ||
expect( sct.get( "nulls" ) ?: "EMPTY" ).toBe( "EMPTY" ); | ||
}); | ||
|
||
|
||
|
||
it( title = "ConcurrentHashMap method call for existing value", body = function( currentSpec ){ | ||
var chm = createObject( "java", "java.util.concurrent.ConcurrentHashMap" ).init(); | ||
chm.put("key","Susi"); | ||
expect( chm.get( "key" ) ?: "EMPTY" ).toBe( "Susi" ); | ||
}); | ||
|
||
it( title = "ConcurrentHashMap method call for NOT existing value ", body = function( currentSpec ){ | ||
var chm = createObject( "java", "java.util.concurrent.ConcurrentHashMap" ).init(); | ||
expect( chm.get( "undefined" ) ?: "EMPTY" ).toBe( "EMPTY" ); | ||
}); | ||
|
||
|
||
|
||
it( title = "struct get existing value", body = function( currentSpec ) { | ||
var sct = {}; | ||
sct["key"]="Susi"; | ||
expect( sct["key"] ?: "EMPTY" ).toBe( "Susi" ); | ||
expect( sct.key ?: "EMPTY" ).toBe( "Susi" ); | ||
}); | ||
|
||
it( title = "struct get NOT existing value", body = function( currentSpec ) { | ||
var sct = {}; | ||
expect( sct["undefined"] ?: "EMPTY" ).toBe( "EMPTY" ); | ||
expect( sct.undefined ?: "EMPTY" ).toBe( "EMPTY" ); | ||
}); | ||
|
||
it( title = "function calls", body = function( currentSpec ) { | ||
expect( susi().sorglos() ?: "EMPTY" ).toBe( "EMPTY" ); | ||
}); | ||
|
||
}); | ||
} | ||
} |